问题
I am in the planning phases for writing an application, still choosing the technology that I wish to use to write the app. The initial idea was to write a web-app but this has (had?) the downfall of being unable to be viewed offline. I then discovered cache manifest, and this potentially seemed like an answer.
However, since that first point it seems that there are size limits on Cache Manifest. I can't find a full list of the size limits for each browser, so I can't tell if it's completely debilitating (though I think it may be). The browsers that I wish the app to work on are Firefox, Chrome and the mobile Safari browsers (that is, it has to work on iPad).
My understanding is that in most cases there is a total cache limit of about 5MB (with it varying from browser to browser), but this would not be enough for my needs. I'm looking to store all of the users online data offline. This includes things like uploaded files (PDFs, pictures) as well as the content required to make the app physically work. In any example I've seen, cache-manifest has only been used to cache offline things like the html, the css, the javascript and the image resources of the website. Is it suitable for offline storage of PDFs the user has uploaded?
If the answer to this question is a resounding no (which I fear that it may be), are there any other solutions? Or is a "proper" app in a browser - that is, one with a reasonable space requirement - completely infeasible at this time? Are we still waiting for the browsers to catch up with the requirements of development?
Edit: Just to add, I am aware that there is no limit on Cache-Manifest in the HTML5 specification, but the implementations all seem to limit it, and this will affect anything I attempt to write.
回答1:
You can see more about limit capacity here: http://grinninggecko.com/developing-cross-platform-html5-offline-app-1/
回答2:
In case people are still wondering about this...
I've currently got an app that is 44MB of resources successfully downloaded and tested offline on Safari(6.1), Chrome(31), Firefox(26), iPad (ios7) and iPhone (ios6).
Only problem I have discovered is when you add the app to the home screen. I've decided this is because the app is too big and needs to expand the cache however there is no handling for this and it just ends with an error. Work around -> reload the app. Close, open, and resave cache = works.
回答3:
There is no limit according to the spec, but I believe the limit is more than 5 MB. See also Is there a size limit for HTML5 Manifest?
回答4:
Appcache size is limited to 5 MB in android devices. If you are creating hybrid application for android devices, you need to ensure that appcache should not exceeds 5MB. Otherwise, appcache download is getting failed once it reaches size limit.
The same issue wont occur in other devices (iphone, windows, blackberry etc).
回答5:
Mobile
| Chrome | Android Browser | Firefox | Safari | Safari | iOS WebView | iOS WebView |
| 40 | 4.3 | 34 | 6,7 | 8 | 6,7 | 8 |
| ~ | ∞ | ∞ | 300MB | 300MB | 100MB | 100MB |
Desktop
| Chrome | Firefox | Safari | Safari | IE | IE |
| 40 | 34 | 6,7 | 8 | 9 | 10,11 |
| ~ | 500MB | ∞ | ∞ | ? | 100MB |
Reference Link
来源:https://stackoverflow.com/questions/6757945/cache-manifest-size-limit-and-web-apps