Skip to content

Commit

Permalink
[e] (0) A sample application cache manifest.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2048 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 11, 2008
1 parent d9c323f commit bb7a67a
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 4 deletions.
46 changes: 42 additions & 4 deletions index
Expand Up @@ -1324,10 +1324,13 @@
<li><a href="#manifests"><span class=secno>5.7.3 </span>The cache
manifest syntax</a>
<ul class=toc>
<li><a href="#writing"><span class=secno>5.7.3.1. </span>Writing
<li><a href="#a-sample"><span class=secno>5.7.3.1. </span>A sample
manifest</a>

<li><a href="#writing"><span class=secno>5.7.3.2. </span>Writing
cache manifests</a>

<li><a href="#parsing1"><span class=secno>5.7.3.2. </span>Parsing
<li><a href="#parsing1"><span class=secno>5.7.3.3. </span>Parsing
cache manifests</a>
</ul>

Expand Down Expand Up @@ -34065,7 +34068,42 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t

<h4 id=manifests><span class=secno>5.7.3 </span>The cache manifest syntax</h4>

<h5 id=writing><span class=secno>5.7.3.1. </span>Writing cache manifests</h5>
<h5 id=a-sample><span class=secno>5.7.3.1. </span>A sample manifest</h5>

<p><em>This section is non-normative.</em>

<p>This example manifest requires two images and a style sheet to be cached
and whitelists a CGI script.

<pre>CACHE MANIFEST
# the above line is required

# this is a comment
# there can be as many of these anywhere in the file
# they are all ignored
# comments can have spaces before them
# but most be alone on the line

# blank lines are ignored too

# these are files that need to be cached they can either be listed
# first, or a "CACHE:" header could be put before them, as is done
# lower down.
images/sound-icon.png
images/background.png
# note that each file has to be put on its own line

# here is a file for the online whitelist -- it isn't cached, and
# references to this file will bypass the cache, always hitting the
# network (or trying to, if the user is offline).
NETWORK:
comm.cgi

# here is another set of files to cache, this time just the CSS file.
CACHE:
style/default.css</pre>

<h5 id=writing><span class=secno>5.7.3.2. </span>Writing cache manifests</h5>

<p>Manifests must be served using the <code
title="">text/cache-manifest</code> MIME type. All resources served using
Expand Down Expand Up @@ -34193,7 +34231,7 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
<p>URLs in manifests must not have fragment identifiers (i.e. the U+0023
NUMBER SIGN character isn't allowed in URLs in manifests).

<h5 id=parsing1><span class=secno>5.7.3.2. </span>Parsing cache manifests</h5>
<h5 id=parsing1><span class=secno>5.7.3.3. </span>Parsing cache manifests</h5>

<p>When a user agent is to <dfn id=parse1>parse a manifest</dfn>, it means
that the user agent must run the following steps:
Expand Down
37 changes: 37 additions & 0 deletions source
Expand Up @@ -31434,6 +31434,43 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t

<h4 id="manifests">The cache manifest syntax</h4>


<h5>A sample manifest</h5>

<p><em>This section is non-normative.</em></p>

<p>This example manifest requires two images and a style sheet to be
cached and whitelists a CGI script.</p>

<pre>CACHE MANIFEST
# the above line is required

# this is a comment
# there can be as many of these anywhere in the file
# they are all ignored
# comments can have spaces before them
# but most be alone on the line

# blank lines are ignored too

# these are files that need to be cached they can either be listed
# first, or a "CACHE:" header could be put before them, as is done
# lower down.
images/sound-icon.png
images/background.png
# note that each file has to be put on its own line

# here is a file for the online whitelist -- it isn't cached, and
# references to this file will bypass the cache, always hitting the
# network (or trying to, if the user is offline).
NETWORK:
comm.cgi

# here is another set of files to cache, this time just the CSS file.
CACHE:
style/default.css</pre>


<h5>Writing cache manifests</h5>

<p>Manifests must be served using the <code
Expand Down

0 comments on commit bb7a67a

Please sign in to comment.