Search code examples
androidhtmlwebviewhtml5-appcache

How can I cache everything using HTML5 Appcache?


I've been working on a mobile application for android using Webview and I'd like to cache everything using Appcache, not only some items but everything on that page, Is it possible or I am being a fool?

Any help is appreciated

Here is my current .appcache file:

CACHE MANIFEST

CACHE:
http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css
http://code.jquery.com/jquery-2.1.4.min.js
http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js

What I'm basically looking for would be a theoretical *(of course it doesn't work but is there something that does something like that?):

CACHE MANIFEST

CACHE:
*

Solution

  • The CACHE section doesn't have the wildcard concept, no. Therefore you can cache everything, but you need to detail each resource explicitly in your manifest to do so.

    In addition, pay heed to browsers and their differing offline cache limits. They're normally around 50MB. Some browsers prompt the user to expand the cache size if that limit is being reached, some do not (e.g. IE11).