The manifest file

Reference on the Manifest file, used to serve pages directly from cache, rather then request them from the server.

Application caches makes it possible to cache a website, application, or individual pages or documents, including their HTTP headers, and make them available for offline browsing.

The manifest file controls which resources that should be cached by browsers, and allowed to be viewed offline. This can be useful for offline applications, or as an extra service to users.

The Manifest file has a mime-type of text/cache-manifest, which should be set on the server-side.

How is it used?

The manifest file should be linked from the HTML Element, using the Manifest attribute.

Example

A manifest file may look like below:

CACHE MANIFEST
http://example.com/
about.html
style/default.css
images/logo.png
images/bg.png

NETWORK:
server.cgi

The CACHE MANIFEST section

This section includes a list of absolute or relative URLs, which can be cached by the browser.

URLs in this section will be loaded directly from the cache, and will only be downloaded again if the manifest file changes.

The NETWORK section

This section is for absolute or relative URLs, which should never be cached.

The FALLBACK section

The fallback section can include a URL, to a general error page, in case the user is offline. I.e

FALLBACK:
/offline.html

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.