HTML5 Application Cache
The HTML5 Application Cache API provides a mechanism for caching the files and resources used by a web page. Once cached, it's as if the user downloaded and installed your application on their device. This allows the application to be used offline when the user is not connected to the Internet.
Note
Browsers may limit the amount of data that can be cached. Some browsers limit it to 5 MB.
The key to getting your application cached is the cache manifest file. This file is a simple text file that contains information about what resources should be cached. It is referenced by the manifest
attribute on the <html>
element of your web page:
<html manifest="myapp.appcache">
Inside the manifest file, you can specify the resources to cache or not cache. The file can have three sections:
CACHE
: This is the default section and lists the files to be cached. Declaring this section header is optional. Wildcards are not allowed in URIs.NETWORK
: This section...