ios – 在iPad Safari上的localStorage是否保持持续?

ios – 在iPad Safari上的localStorage是否保持持续?,第1张

概述我已经看到网络上的意见分歧.据说,从iOS 5.1开始,iPad上的 HTML5内容的本地数据存储不再保证是持久的,但是在苹果当前的Safari开发者页面( https://developer.apple.com/technologies/safari/html5.html)上,建议离线持久性被保证. 有没有人有任何最近的经验与这个问题,并能评论如何可靠的数据库HTML5的功能与Safari在iP 我已经看到网络上的意见分歧.据说,从iOS 5.1开始,iPad上的 HTML5内容的本地数据存储不再保证是持久的,但是在苹果当前的Safari开发者页面( https://developer.apple.com/technologies/safari/html5.html)上,建议离线持久性被保证.

有没有人有任何最近的经验与这个问题,并能评论如何可靠的数据库HTML5的功能与Safari在iPad上?

解决方法 这可能足够的信息:
localstorage的w3c规范是:

The second storage mechanism (note: localstorage) is designed for storage that spans multiple windows,and lasts beyond the current session. In particular,Web applications may wish to store megabytes of user data,such as entire user-authored documents or a user’s mailBox,on the clIEnt sIDe for performance reasons.

在Apple页面上:

Safari supports the latest HTML5 offline data storage features. Your application can store its information on the local machine using either a simple key/value-based data store,or a robust sql database. The data is stored locally and persists across launches of Safari so your application doesn’t need a network connection to access the data,improving startup time and overall performance.

搜索谷歌(和雅虎,因为一些反谷歌的怪胎)给了我:

In iOS 5.1 Apple have moved the location of localstorage files into a Caches folder which is subject to occasional clean up,at the behest of the OS,typically if space is short. It is likely that Apple have done this to stop localstorage being backed up to iCloud.

localStorage not accessible in IOS-6 Safari

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”));

回答:

I was able to fix the issue by turning off private browsing on the iPad. I came across the solution from the reference : 07001

总结

以上是内存溢出为你收集整理的ios – 在iPad Safari上的localStorage是否保持持续?全部内容,希望文章能够帮你解决ios – 在iPad Safari上的localStorage是否保持持续?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1097335.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-28
下一篇2022-05-28

发表评论

登录后才能评论

评论列表(0条)

    保存