Html iPhone本地存储的限制?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1921048/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:36:47  来源:igfitidea点击:

Limit of localstorage on iPhone?

iphonehtmllocal-storage

提问by fesja

I'm wondering what's the limit of localstorage HTML 5 on iPhone? I read that it was like 5 Mb, but I'm surprised is so little. Any ideas?

我想知道 iPhone 上 localstorage HTML 5 的限制是什么?我读到它像 5 Mb,但我很惊讶它是如此之小。有任何想法吗?

采纳答案by Raptrex

"The current default on iPhone is 5.0 MB. If your database grows beyond this limit, the user will automatically be asked to allow or deny the size increase. If he allows the increase, the database size limit will be upped to 10.MB"

“iPhone 上的当前默认值为 5.0 MB。如果您的数据库增长超过此限制,系统将自动要求用户允许或拒绝增加大小。如果他允许增加,则数据库大小限制将提高到 10.MB”

Source: http://ofps.oreilly.com/titles/9780596805784/ch05_id35816678.html#ch05_id35933214

来源:http: //ofps.oreilly.com/titles/9780596805784/ch05_id35816678.html#ch05_id35933214

回答by SKFox

MobileSafari on the iPhone and iPad will hold 5MB before throwing a QUOTA_EXCEEDED_ERRwhen using localStorage. If you're using HTML5 SQL, the user will be prompted at 5MB intervals to increase the storage limit.

QUOTA_EXCEEDED_ERR使用 localStorage 时,iPhone 和 iPad 上的MobileSafari 将保留 5MB,然后再抛出。如果您使用 HTML5 SQL,系统会以 5MB 的间隔提示用户增加存储限制。

DesktopSafari v4 does not have a limit, afaik, on localStorage. However, Safari v5 limits the site to 5MB before throwing a QUOTA_EXCEEDED_ERR, exhibiting the same behavior as the mobile version.

DesktopSafari v4 在 localStorage 上没有限制,afaik。但是,Safari v5 在抛出 之前将站点限制为 5MB QUOTA_EXCEEDED_ERR,表现出与移动版本相同的行为。

回答by dbower60

There is a great way to tell the limit of your browser...

有一种很好的方法可以告诉您浏览器的限制...

http://dev-test.nemikor.com/web-storage/support-test/

http://dev-test.nemikor.com/web-storage/support-test/