1

I'm playing around with HTML5. For that purpose I created some small Javascript widget using localStorage amongst other things. Up until yesterday Firefox played nice.

Then 6.0.2 came around and suddenly the localStorage object is null.

Going to http://html5test.com shows that Local Storage is not supported.

enter image description here

Using Chrome to view the exact same code (found at http://scriptonomicon.dk/CCDashboard/index.html) works fine. Using Firefox 6.0.2 on Windows (7) works just fine.

Has anyone else experienced that localstorage is broken on Firefox 6.0.2 on Mac?

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
erlando
  • 6,736
  • 4
  • 24
  • 29
  • I do remember hearing that a security bug in the localstorage spec/implementation caused it to be dropped for a short time, in ff/chrome. – Kzqai Dec 28 '11 at 16:15

3 Answers3

2

Works fine for me:

HTML5Test screenshot showing success

someone
  • 1,468
  • 8
  • 9
2

You should check the storage preferences, type about:config into the location bar. The relevant preferences are:

  • dom.storage.enabled - should obviously be true
  • dom.storage.default_quota - default value is 5120
Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126
  • That's it! dom.storage.enabled was "user set" to false. Now the question remains how that happened. I certainly didn't set it. Thank you. – erlando Sep 09 '11 at 13:17
  • @erlando: If you had some "privacy protection" extension installed - that would be your prime suspect. – Wladimir Palant Sep 09 '11 at 13:58
  • It went from "working" on 6.0.1 to "not-working" on 6.0.2. Only thing happening AFAIK was the update from .1 to .2 . – erlando Sep 12 '11 at 11:15
  • @erlando: That update definitely didn't change your preferences however, only changes happened in the certificates code. – Wladimir Palant Sep 12 '11 at 11:19
0

I had this problem too, on Firefox 6.0.2 on Windows. Tried on two different PCs. Gets weirder though, as the flags in about:config were set correctly and the html5test.com indicator said it's supported. It definitely wasn't though - I spent 4 hours pulling my hair out at a simple implementation of setItem / getItem which just did not work. Fine in Chrome.

In the end I think I have resolved it though. Are you working locally on the filesystem by any chance? Try working from a proper domain or setting up local DNS for a test domain locally - that has done the trick for me - it now works!

Dan
  • 5,836
  • 22
  • 86
  • 140