[html5] r2048 - [e] (0) A sample application cache manifest.

whatwg at whatwg.org whatwg at whatwg.org
Mon Aug 11 16:26:07 PDT 2008


Author: ianh
Date: 2008-08-11 16:26:06 -0700 (Mon, 11 Aug 2008)
New Revision: 2048

Modified:
   index
   source
Log:
[e] (0) A sample application cache manifest.

Modified: index
===================================================================
--- index	2008-08-11 22:54:36 UTC (rev 2047)
+++ index	2008-08-11 23:26:06 UTC (rev 2048)
@@ -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>
 
@@ -34065,8 +34068,43 @@
 
   <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
    the <code title="">text/cache-manifest</code> MIME type must follow the
@@ -34193,7 +34231,7 @@
   <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:

Modified: source
===================================================================
--- source	2008-08-11 22:54:36 UTC (rev 2047)
+++ source	2008-08-11 23:26:06 UTC (rev 2048)
@@ -31434,6 +31434,43 @@
 
   <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




More information about the Commit-Watchers mailing list