最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - localStorage not accessible in IOS-6 Safari - Stack Overflow

programmeradmin2浏览0评论

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.

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.

Share edited Nov 3, 2012 at 11:54 spolto 4,5514 gold badges28 silver badges34 bronze badges asked Nov 3, 2012 at 11:50 AmberAmber 1,24912 silver badges30 bronze badges 3
  • What is the error? Is window.localStorage defined? caniuse confirms web storage is supported by iOS Safari. – Frédéric Hamidi Commented Nov 3, 2012 at 11:58
  • The error which i got was : QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota. – Amber Commented Nov 3, 2012 at 12:06
  • 1 possible duplicate of html5 localStorage doesn't works in ios safari private browsing – KingKongFrog Commented Aug 9, 2013 at 15:44
Add a ment  | 

1 Answer 1

Reset to default 7

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./cloudhead/less.js/issues/312#issuement-2994845

发布评论

评论列表(0)

  1. 暂无评论