See also
When creating pages, make sure to use a Doctype declaration. For HTML5 this means all HTML files should start with:
<!DOCTYPE html>
Warning
Before the doctype declaration, no spaces, characters or other content is allowed.
See also
This explicitly allows browsers to download web application for offline availability. This uses a so-called cache manifest which looks like this:
# <VERSION IDENIFIER>
CACHE MANIFEST
FALLBACK:
# This will cause any uncached URL to be substituted with offline.html
/ /offline.html
NETWORK:
# These resources will only be available online.
/checking.cgi
CACHE:
# These resources will be downloaded in the background and cached
/offline.html
/test.css
/test.js
/test.png
Note
The cached files are only updated when the contents of the manifest file have changed. Hence, it is essential that a some kind of version identifier or last modified date be added in a comment in the file.
Note
Using a cache manifest causes the cached files to be loaded instead of the online version of files, while uploads are downloaded in the background. Updated files will only be available after a reload of the page, which can be automated using JavaScript.
Note
For HTML5 offline app cache to function it is absolutely essential that the MIME type be set to text/cache-manifest.
See also
See also