Did localStorage just break in Firefox 6.0.2 on Mac?

ε祈祈猫儿з 提交于 2019-12-11 04:37:12

问题


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.

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?


回答1:


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



回答2:


Works fine for me:




回答3:


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!



来源:https://stackoverflow.com/questions/7355324/did-localstorage-just-break-in-firefox-6-0-2-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!