[英]LocalStorage quota exceeded (dom error 22) on iOS, but private mode not set
I'm trying to store a .json file in iOS localStorage. 我正在尝试在iOS localStorage中存储.json文件。 The file is 3.4mb uncompressed.
该文件未压缩为3.4mb。
When I try to store it, mobile Sarari rejects it with a DOM error 22: "An attempt was made to add something to storage that exceeded the quota". 当我尝试存储它时,移动Sarari拒绝它,并显示DOM错误22:“试图向存储中添加超出配额的内容”。
This doesn't happen when I test my app in Chrome, but it does happen in desktop Safari. 当我在Chrome中测试我的应用时,这不会发生,但在桌面Safari中会发生。 It seems Chrome automatically ups the quota to 10mb, whereas mobile Safari and desktop Safari do not and just fail.
Chrome似乎会自动将配额增加到10mb,而移动Safari和台式机Safari不会,只会失败。
Why does storing a 3.4mb json file cause this error when the storage quota for iOS / Safari is 5mb? 当iOS / Safari的存储配额为5mb时,为什么存储3.4mb json文件会导致此错误?
Should also note that I have checked to see if private mode is enabled, and made sure it is not. 还应注意,我已经检查了是否启用了私有模式,并确保未启用它。
我听说如果浏览器处于私人或隐身模式,您会收到此错误。
Chrome在隐身模式下的限制为100MB。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.