localStorage not accessible in IOS-6 Safari

纵饮孤独 提交于 2019-12-30 06:37:30

问题


I am not able to access localStorage in Safari (IPad with IOS-6).

For example, the following code is working fine in Windows on all browsers and on (iPad with iOS-5) but not in iOS-6:

localStorage.setItem("var","5");
alert(localStorage.getItem("var"));

Please help.


回答1:


I was able to fix the issue by turning off private browsing on the iPad. I came across the solution from the reference : https://github.com/cloudhead/less.js/issues/312#issuecomment-2994845



来源:https://stackoverflow.com/questions/13208878/localstorage-not-accessible-in-ios-6-safari

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