ipad上离线存储的限制

I've been working on a project that uses localStorage on an iPad. In my experience, the localStorage is perfectly stable. However, there are two things to consider:

  • Yes, the storage-limit is still 5Mb. Since characters are stored UTF16, only 2.5M characters can be stored in localStorage.

  • In contrast to other localStorage implementations, localStorage.setItem() doesn't delete any previous items with the same key before storing the new item. In other words: When overwriting an item, one should always call localStorage.removeItem() before calling localStorage.setItem(), or you'll quickly run out of space.

  • 测试结果确实如此。。晕啊。

localStorage(2.5M持久)
(下降的Safari浏览器)sessionStoratge
SQL数据库网站(但必须有权限的用户,最大50M)

日文网站翻译的结果

 

If you're using HTML5 SQL , the user will be prompted at 5MB intervals to increase the storage limit.

posted @ 2012-04-19 15:13  KID  阅读(466)  评论(0编辑  收藏  举报