简体   繁体   English

最大尺寸的iPad / iPhone离线应用程序缓存

[英]Max size iPad / iPhone Offline Application Cache

Anyone knows the max size of Safari's 'Offline Application Cache' on the iPad & iPhone. 任何人都知道iPad和iPhone上Safari的“离线应用程序缓存”的最大大小。 Looks like it's 5MB. 看起来像是5MB。 Is there any way to enlarge this size? 有没有办法扩大这个尺寸?

Offline application cache docs: https://developer.apple.com/library/archive/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html 脱机应用程序缓存文档: https//developer.apple.com/library/archive/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html

I have the same problem on iPhone. 我在iPhone上遇到同样的问题。 On iPad though I figured a turn around. 在iPad上,虽然我想转了一圈。 If your manifest contains files less than 5MB the first time and you update the cache by window.applicationCache.update() and before doing the update you increase the manifest files to be below 10mb it will work. 如果您的清单第一次包含小于5MB的文件,并且您通过window.applicationCache.update()更新缓存,并且在执行更新之前将清单文件增加到10mb以下它将起作用。 If you continue doing that (increasing the manifest by <5MB each time and then update()) you will see that the iPad can cache more than the 5MB limit. 如果你继续这样做(每次增加清单<5MB然后更新()),你会发现iPad可以缓存超过5MB的限制。

It is so sad that Apple by not supporting Flash and MIDP but only HTML5 for web-apps screws so much on that. 让Apple感到非常伤心,因为它不支持Flash和MIDP,而只支持HTML5 for web-apps。

If your application uses more than 5mb than iPhone/iPad will ask the user to allow the website to use more space. 如果您的应用程序使用超过5mb而不是iPhone / iPad将要求用户允许该网站使用更多空间。

增加本地存储

Let's read my test at here: Mobile Safari 5mb HTML5 application cache limit? 我们在这里阅读我的测试: Mobile Safari 5mb HTML5应用程序缓存限制?

I think your apps need user's agreement for storage more than 5MB. 我认为您的应用需要用户同意存储超过5MB的存储空间。 Another problem you get is the network problem. 您遇到的另一个问题是网络问题。 It's too slow for 50MB transferring... 对于50MB转移来说太慢了......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM