HTML and CSS Reference
In-Depth Information
Offline application cache
The offline application cache is a way to ensure that critical files are stored on the client
so that if the connection is lost and the page is reloaded, the cached files will still be
loaded. If all necessary files are cached, the website can be navigated normally even
when the user is offline. This may be particularly useful in a mobile web context, where
the Internet connection might be intermitted.
The application cache uses the manifest attribute found on the root html element
to associate the web page with a cache manifest file that lists the files to cache (or in
some cases, not cache!). The cache manifest file is just a text file with the .manifest
file extension. It must be served from the web server using the text/cache-mani-
fest MIME type. It use a relative or absolute URL but typically looks something like
<!DOCTYPE html>
<html manifest="/sitecache.manifest">
The sitecache.manifest file (depending on your configuration; you may name
it differently) must begin with the key phrase CACHE MANIFEST and then is followed
optionally by three sections. These are the following:
CACHE : The files to cache.
NETWORK : The files that always should be retrieved from online.
FALLBACK : Fallback content for files that were not found in the cache. The file
to find is given first, followed by the fallback file's location.
The cache manifest can also contain comments, which are ignored. Comments begins
with the hash sign (#). A cache manifest file might look something like this:
# list of files to cache
# files that require a network connection
# files to use in place of other files that were not
Search WWH ::

Custom Search