HTML and CSS Reference
In-Depth Information
5.4.2. Creating a cache manifest file
The manifest file is a basic text file that contains a title header, CACHE MANIFEST , and
up to three subsections with the headings CACHE , NETWORK , and FALLBACK . For explan-
atory purposes only, here's a sample cache manifest file:
CACHE MANIFEST
# Rev 3
CACHE:
index.html
pics/logo.png
stylesheet.css
FALLBACK:
*.html /offline.html
NETWORK:
http://api.stockwebsite.com
The CACHE section represents the default section for entries. URIs listed under this header
will be cached after they're downloaded for the first time.
Note
You can also forgo specifying a CACHE header and simply place the URIs to be cached
immediately under the title header, CACHE MANIFEST .
The FALLBACK section is optional and specifies one or more pairs of URIs to use when
a resource is offline. The first URI in a pair is the online resource; the second is the local
fallback resource. Wildcards can be used.
Note
Both URIs must have a relative path name. Also, the URIs here, as well as in other sections
of the cache manifest, must have the same scheme, host, and port as the manifest.
Search WWH ::




Custom Search