
If you still find yourself on occasion using cookies when developing websites — to remember some setting, or selection, or whatever, stop it! Cookies suck — all you can do is store simple strings, which doesn’t give you a lot of options when you need to store complex information that might require an array or an object.
Local storage, on the other hand, is an HTML5 specification that allows browsers to store objects, XML or JSON data easily and it’s fairly widely supported. Better yet, with the jStorage library it works on pretty much every browser of consequence, including IE7 and IE6, where it falls back to userData behaviour. The only downside in case of IE7 and IE6 is that storage size is limited to 128KB, whereas in most other browsers it’s 5MB. Read more »