Use Cookie or LocalStorage?

3

I was developing a plugin for jQuery and needed to store some information.

I thought about using localStorage of HTML5 , however I was alerted by a friend that in some old versions of browsers it would not work, and that I should use Cookies

I took a look at the W3School to check this out, and it says the following:

  

Note: Internet Explorer 7 and earlier versions, do not support Web   Storage.

That is:

  

Internet Explorer 7 and earlier versions do not support Storage.

  • Should I really still care about developing for Internet Explorer 7 or earlier versions?

  • I can use localStorage securely that I will not have any problems with compatibility with browsers launched in the middle of Internet Explorer 9 , or should I still use the good old Cookie ?

  • asked by anonymous 23.01.2015 / 15:55

    2 answers

    5

    I think this depends a lot on what support you intend to give your browsers. If you are looking to support as many browsers as possible you could use, or suggest, a pollyfill for WebStorage.

    The following link lists pollyfills:

    link

    I would particularly choose to use WebStorage, as the trend is for browsers to be updated over the years and IE 7 is already quite old, although it is still widely used and I would choose not to support it. >     

    23.01.2015 / 16:02
    2
  • I really should still worry about developing for the Internet Explorer 7 or earlier versions?

    This will depend on whether you intend to support older browsers, I particularly believe you do not need to support browsers with versions prior to IE7, Firefox 3.5, because should not have many users here you can see some statistics about the most commonly used browsers.

  • Can I use% sure% that I will not have compatibility issues with browsers launched in the middle of Internet Explorer 9, or should I still use the good old localStorage ?

    You can use Cookie smoothly in modern versions, here you can see in which browsers it supports.

  • 23.01.2015 / 16:44