HTML5 introduces the ability to cache content client-side so that often-used resources can be used without re-downloading them. This also enables a site to be viewed from the client when no network connection is available (i.e., offline viewing of the site).
In order for this to work, there are a few things one must do:
- Create a plain text file listing all of the resources that should be cached by the user agent (e.g., a web browser)– the cache manifest.
- Refer to that file in the opening html tag of every page that will use cached resources.
- Configure the web server so that the file is sent to the user agent with a specific MIME type: text/cache-manifest
- Regenerate the cache manifest any time you change the files in your site.