[html5] r3952 - [e] (0) Try to clarify fallback entries. It's not entirely clear that I did an a [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Sep 21 18:15:27 PDT 2009
Author: ianh
Date: 2009-09-21 18:15:26 -0700 (Mon, 21 Sep 2009)
New Revision: 3952
Modified:
index
source
Log:
[e] (0) Try to clarify fallback entries. It's not entirely clear that I did an acceptable job here, but it's a start.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=7489
Modified: index
===================================================================
--- index 2009-09-22 00:39:07 UTC (rev 3951)
+++ index 2009-09-22 01:15:26 UTC (rev 3952)
@@ -51870,16 +51870,16 @@
<dt><dfn id=concept-appcache-explicit title=concept-appcache-explicit>Explicit entries</dfn>
- <dd>Resources that were listed in the cache's <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>. Explicit
- entries can also be marked as <dfn id=concept-appcache-foreign title=concept-appcache-foreign>foreign</dfn>, which means that they
- have a <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code>
+ <dd>Resources that were listed in the cache's <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> in an <a href=#concept-appcache-manifest-explicit title=concept-appcache-manifest-explicit>explicit
+ section</a>. Explicit entries can also be marked as <dfn id=concept-appcache-foreign title=concept-appcache-foreign>foreign</dfn>, which means that
+ they have a <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code>
attribute but that it doesn't point at this cache's <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>.
<dt><dfn id=concept-appcache-fallback title=concept-appcache-fallback>Fallback entries</dfn>
- <dd>Resources that were listed in the cache's <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> as fallback
- entries.
+ <dd>Resources that were listed in the cache's <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> in a <a href=#concept-appcache-manifest-fallback title=concept-appcache-manifest-fallback>fallback
+ section</a>.
</dl><p class=note>A URL in the list can be flagged with multiple
@@ -52008,7 +52008,41 @@
CACHE:
style/default.css</pre>
+ <p>It could equally well be written as follows:</p>
+ <pre>CACHE MANIFEST
+NETWORK:
+comm.cgi
+CACHE:
+style/default.css
+images/sound-icon.png
+images/background.png</pre>
+
+ <hr><p>The following manifest defines a catch-all error page that is
+ displayed for any page on the site while the user is offline. It
+ also specifies that the <a href=#concept-appcache-onlinewhitelist-wildcard title=concept-appcache-onlinewhitelist-wildcard>online whitelist
+ wildcard flag</a> is <i title="">open</i>, meaning that accesses
+ to resources on other sites will not be blocked. (Resources on the
+ same site are already not blocked because of the catch-all fallback
+ namespace.)</p>
+
+ <p>So long as all pages on the site reference this manifest, they
+ will get cached locally as they are fetched, so that subsequent hits
+ to the same page will load the page immediately from the
+ cache. Until the manifest is changed, those pages will not be
+ fetched from the server again. When the manifest changes, then all
+ the files will be redownloaded.</p>
+
+ <p>Subresources, such as style sheets, images, etc, would only be
+ cached using the regular HTTP caching semantics, however.</p>
+
+ <pre>CACHE MANIFEST
+FALLBACK:
+/ /offline.html
+NETWORK:
+*</pre>
+
+
<h5 id=writing-cache-manifests><span class=secno>6.9.3.2 </span>Writing cache manifests</h5>
<p>Manifests must be served using the
@@ -52066,13 +52100,13 @@
possible section headers:
<dl><dt><code>CACHE:</code>
- <dd>Switches to the explicit section.
+ <dd>Switches to the <dfn id=concept-appcache-manifest-explicit title=concept-appcache-manifest-explicit>explicit section</dfn>.
<dt><code>FALLBACK:</code>
- <dd>Switches to the fallback section.
+ <dd>Switches to the <dfn id=concept-appcache-manifest-fallback title=concept-appcache-manifest-fallback>fallback section</dfn>.
<dt><code>NETWORK:</code>
- <dd>Switches to the online whitelist section.
+ <dd>Switches to the <dfn id=concept-appcache-manifest-network title=concept-appcache-manifest-network>online whitelist section</dfn>.
</dl><p>Section header lines must consist of zero or more U+0020 SPACE
and U+0009 CHARACTER TABULATION (tab) characters, followed by one
@@ -52080,37 +52114,39 @@
followed by zero or more U+0020 SPACE and U+0009 CHARACTER
TABULATION (tab) characters.</p>
- <p>Ironically, by default, the current section is the explicit
- section.</p>
+ <p>Ironically, by default, the current section is the
+ <a href=#concept-appcache-manifest-explicit title=concept-appcache-manifest-explicit>explicit section</a>.</p>
<dt>Data for the current section
<dd>
<p>The format that data lines must take depends on the current
section.</p>
- <p>When the current section is the explicit section, data lines
- must consist of zero or more U+0020 SPACE and U+0009 CHARACTER
- TABULATION (tab) characters, a <a href=#valid-url>valid URL</a> identifying
- a resource other than the manifest itself, and then zero or more
- U+0020 SPACE and U+0009 CHARACTER TABULATION (tab) characters.</p>
+ <p>When the current section is the <a href=#concept-appcache-manifest-explicit title=concept-appcache-manifest-explicit>explicit
+ section</a>, data lines must consist of zero or more U+0020
+ SPACE and U+0009 CHARACTER TABULATION (tab) characters, a
+ <a href=#valid-url>valid URL</a> identifying a resource other than the
+ manifest itself, and then zero or more U+0020 SPACE and U+0009
+ CHARACTER TABULATION (tab) characters.</p>
- <p>When the current section is the online whitelist section, data
- lines must consist of zero or more U+0020 SPACE and U+0009
- CHARACTER TABULATION (tab) characters, either a single U+002A
- ASTERISK character (*) <!--
+ <p>When the current section is the <a href=#concept-appcache-manifest-network title=concept-appcache-manifest-network>online whitelist
+ section</a>, data lines must consist of zero or more U+0020
+ SPACE and U+0009 CHARACTER TABULATION (tab) characters, either a
+ single U+002A ASTERISK character (*) <!--
concept-appcache-onlinewhitelist-wildcard --> or a <a href=#valid-url>valid
URL</a> identifying a resource other than the manifest itself,
and then zero or more U+0020 SPACE and U+0009 CHARACTER TABULATION
(tab) characters.</p>
- <p>When the current section is the fallback section, data lines
- must consist of zero or more U+0020 SPACE and U+0009 CHARACTER
- TABULATION (tab) characters, a <a href=#valid-url>valid URL</a> identifying
- a resource other than the manifest itself, one or more U+0020
- SPACE and U+0009 CHARACTER TABULATION (tab) characters, another
+ <p>When the current section is the <a href=#concept-appcache-manifest-fallback title=concept-appcache-manifest-fallback>fallback
+ section</a>, data lines must consist of zero or more U+0020
+ SPACE and U+0009 CHARACTER TABULATION (tab) characters, a
<a href=#valid-url>valid URL</a> identifying a resource other than the
- manifest itself, and then zero or more U+0020 SPACE and U+0009
- CHARACTER TABULATION (tab) characters.</p>
+ manifest itself, one or more U+0020 SPACE and U+0009 CHARACTER
+ TABULATION (tab) characters, another <a href=#valid-url>valid URL</a>
+ identifying a resource other than the manifest itself, and then
+ zero or more U+0020 SPACE and U+0009 CHARACTER TABULATION (tab)
+ characters.</p>
<p class=note>The URLs in data lines can't be empty strings,
since those would be relative URLs to the manifest itself. Such
@@ -52120,10 +52156,11 @@
empty.</p>
<p>URLs that are to be fallback pages associated with <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespaces</a>, and
- those namespaces themselves, must be given in fallback sections,
+ those namespaces themselves, must be given in <a href=#concept-appcache-manifest-fallback title=concept-appcache-manifest-fallback>fallback sections</a>,
with the namespace being the first URL of the data line, and the
corresponding fallback page being the second URL. All the other
- pages to be cached must be listed in explicit sections.</p>
+ pages to be cached must be listed in <a href=#concept-appcache-manifest-explicit title=concept-appcache-manifest-explicit>explicit
+ sections</a>.</p>
<p><a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>Fallback
namespaces</a> and <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a> must have
@@ -52133,12 +52170,12 @@
namespace</a> must not be listed more than once.</p>
<p>URLs that the user agent is to put into the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a>
- must all be specified in online whitelist sections. (This is needed
- for any URL that the page is intending to use to communicate back to
- the server.) To specify that all URLs are automatically whitelisted
- in this way, a U+002A ASTERISK character (*) character may be
- specified as one of the URLs. <!--
- concept-appcache-onlinewhitelist-wildcard --></p>
+ must all be specified in <a href=#concept-appcache-manifest-network title=concept-appcache-manifest-network>online whitelist
+ sections</a>. (This is needed for any URL that the page is
+ intending to use to communicate back to the server.) To specify that
+ all URLs are automatically whitelisted in this way, a U+002A
+ ASTERISK character (*) character may be specified as one of the
+ URLs. <!-- concept-appcache-onlinewhitelist-wildcard --></p>
<p>Relative URLs must be given relative to the manifest's own
URL. All URLs in the manifest must have the same <a href=#url-scheme title=url-scheme><scheme></a> as the manifest itself
@@ -52392,11 +52429,13 @@
whitelist URLs</var>, and the <var title="">online whitelist
wildcard flag</var>.</li>
- </ol><p class=note>If a resource is listed in the explicit section and
- matches an entry in the online whitelist, or if a resource matches
- both an entry in the fallback section and the online whitelist, the
- resource will taken from the cache, and the online whitelist entry
- will be ignored.</p>
+ </ol><p class=note>If a resource is listed in the <a href=#concept-appcache-manifest-explicit title=concept-appcache-manifest-explicit>explicit section</a>
+ and matches an entry in the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a>, or
+ if a resource matches both an entry in the <a href=#concept-appcache-manifest-fallback title=concept-appcache-manifest-fallback>fallback section</a>
+ and the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
+ whitelist</a>, the resource will taken from the cache, and the
+ <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
+ whitelist</a> entry will be ignored.</p>
<h4 id=updating-an-application-cache><span class=secno>6.9.4 </span>Updating an application cache</h4>
Modified: source
===================================================================
--- source 2009-09-22 00:39:07 UTC (rev 3951)
+++ source 2009-09-22 01:15:26 UTC (rev 3952)
@@ -58582,10 +58582,11 @@
<dt><dfn title="concept-appcache-explicit">Explicit entries</dfn>
<dd>Resources that were listed in the cache's <span
- title="concept-appcache-manifest">manifest</span>. Explicit
- entries can also be marked as <dfn
- title="concept-appcache-foreign">foreign</dfn>, which means that they
- have a <code title="attr-html-manifest">manifest</code>
+ title="concept-appcache-manifest">manifest</span> in an <span
+ title="concept-appcache-manifest-explicit">explicit
+ section</span>. Explicit entries can also be marked as <dfn
+ title="concept-appcache-foreign">foreign</dfn>, which means that
+ they have a <code title="attr-html-manifest">manifest</code>
attribute but that it doesn't point at this cache's <span
title="concept-appcache-manifest">manifest</span>.
@@ -58593,8 +58594,9 @@
<dt><dfn title="concept-appcache-fallback">Fallback entries</dfn>
<dd>Resources that were listed in the cache's <span
- title="concept-appcache-manifest">manifest</span> as fallback
- entries.
+ title="concept-appcache-manifest">manifest</span> in a <span
+ title="concept-appcache-manifest-fallback">fallback
+ section</span>.
</dl>
@@ -58757,7 +58759,44 @@
CACHE:
style/default.css</pre>
+ <p>It could equally well be written as follows:</p>
+ <pre>CACHE MANIFEST
+NETWORK:
+comm.cgi
+CACHE:
+style/default.css
+images/sound-icon.png
+images/background.png</pre>
+
+ <hr>
+
+ <p>The following manifest defines a catch-all error page that is
+ displayed for any page on the site while the user is offline. It
+ also specifies that the <span
+ title="concept-appcache-onlinewhitelist-wildcard">online whitelist
+ wildcard flag</span> is <i title="">open</i>, meaning that accesses
+ to resources on other sites will not be blocked. (Resources on the
+ same site are already not blocked because of the catch-all fallback
+ namespace.)</p>
+
+ <p>So long as all pages on the site reference this manifest, they
+ will get cached locally as they are fetched, so that subsequent hits
+ to the same page will load the page immediately from the
+ cache. Until the manifest is changed, those pages will not be
+ fetched from the server again. When the manifest changes, then all
+ the files will be redownloaded.</p>
+
+ <p>Subresources, such as style sheets, images, etc, would only be
+ cached using the regular HTTP caching semantics, however.</p>
+
+ <pre>CACHE MANIFEST
+FALLBACK:
+/ /offline.html
+NETWORK:
+*</pre>
+
+
<h5>Writing cache manifests</h5>
<p>Manifests must be served using the
@@ -58818,13 +58857,13 @@
<dl>
<dt><code>CACHE:</code>
- <dd>Switches to the explicit section.
+ <dd>Switches to the <dfn title="concept-appcache-manifest-explicit">explicit section</dfn>.
<dt><code>FALLBACK:</code>
- <dd>Switches to the fallback section.
+ <dd>Switches to the <dfn title="concept-appcache-manifest-fallback">fallback section</dfn>.
<dt><code>NETWORK:</code>
- <dd>Switches to the online whitelist section.
+ <dd>Switches to the <dfn title="concept-appcache-manifest-network">online whitelist section</dfn>.
</dl>
@@ -58834,37 +58873,42 @@
followed by zero or more U+0020 SPACE and U+0009 CHARACTER
TABULATION (tab) characters.</p>
- <p>Ironically, by default, the current section is the explicit
- section.</p>
+ <p>Ironically, by default, the current section is the
+ <span title="concept-appcache-manifest-explicit">explicit section</span>.</p>
<dt>Data for the current section
<dd>
<p>The format that data lines must take depends on the current
section.</p>
- <p>When the current section is the explicit section, data lines
- must consist of zero or more U+0020 SPACE and U+0009 CHARACTER
- TABULATION (tab) characters, a <span>valid URL</span> identifying
- a resource other than the manifest itself, and then zero or more
- U+0020 SPACE and U+0009 CHARACTER TABULATION (tab) characters.</p>
+ <p>When the current section is the <span
+ title="concept-appcache-manifest-explicit">explicit
+ section</span>, data lines must consist of zero or more U+0020
+ SPACE and U+0009 CHARACTER TABULATION (tab) characters, a
+ <span>valid URL</span> identifying a resource other than the
+ manifest itself, and then zero or more U+0020 SPACE and U+0009
+ CHARACTER TABULATION (tab) characters.</p>
- <p>When the current section is the online whitelist section, data
- lines must consist of zero or more U+0020 SPACE and U+0009
- CHARACTER TABULATION (tab) characters, either a single U+002A
- ASTERISK character (*) <!--
+ <p>When the current section is the <span
+ title="concept-appcache-manifest-network">online whitelist
+ section</span>, data lines must consist of zero or more U+0020
+ SPACE and U+0009 CHARACTER TABULATION (tab) characters, either a
+ single U+002A ASTERISK character (*) <!--
concept-appcache-onlinewhitelist-wildcard --> or a <span>valid
URL</span> identifying a resource other than the manifest itself,
and then zero or more U+0020 SPACE and U+0009 CHARACTER TABULATION
(tab) characters.</p>
- <p>When the current section is the fallback section, data lines
- must consist of zero or more U+0020 SPACE and U+0009 CHARACTER
- TABULATION (tab) characters, a <span>valid URL</span> identifying
- a resource other than the manifest itself, one or more U+0020
- SPACE and U+0009 CHARACTER TABULATION (tab) characters, another
+ <p>When the current section is the <span
+ title="concept-appcache-manifest-fallback">fallback
+ section</span>, data lines must consist of zero or more U+0020
+ SPACE and U+0009 CHARACTER TABULATION (tab) characters, a
<span>valid URL</span> identifying a resource other than the
- manifest itself, and then zero or more U+0020 SPACE and U+0009
- CHARACTER TABULATION (tab) characters.</p>
+ manifest itself, one or more U+0020 SPACE and U+0009 CHARACTER
+ TABULATION (tab) characters, another <span>valid URL</span>
+ identifying a resource other than the manifest itself, and then
+ zero or more U+0020 SPACE and U+0009 CHARACTER TABULATION (tab)
+ characters.</p>
<p class="note">The URLs in data lines can't be empty strings,
since those would be relative URLs to the manifest itself. Such
@@ -58877,10 +58921,13 @@
<p>URLs that are to be fallback pages associated with <span
title="concept-appcache-fallback-ns">fallback namespaces</span>, and
- those namespaces themselves, must be given in fallback sections,
+ those namespaces themselves, must be given in <span
+ title="concept-appcache-manifest-fallback">fallback sections</span>,
with the namespace being the first URL of the data line, and the
corresponding fallback page being the second URL. All the other
- pages to be cached must be listed in explicit sections.</p>
+ pages to be cached must be listed in <span
+ title="concept-appcache-manifest-explicit">explicit
+ sections</span>.</p>
<p><span title="concept-appcache-fallback-ns">Fallback
namespaces</span> and <span
@@ -58892,12 +58939,13 @@
<p>URLs that the user agent is to put into the <span
title="concept-appcache-onlinewhitelist">online whitelist</span>
- must all be specified in online whitelist sections. (This is needed
- for any URL that the page is intending to use to communicate back to
- the server.) To specify that all URLs are automatically whitelisted
- in this way, a U+002A ASTERISK character (*) character may be
- specified as one of the URLs. <!--
- concept-appcache-onlinewhitelist-wildcard --></p>
+ must all be specified in <span
+ title="concept-appcache-manifest-network">online whitelist
+ sections</span>. (This is needed for any URL that the page is
+ intending to use to communicate back to the server.) To specify that
+ all URLs are automatically whitelisted in this way, a U+002A
+ ASTERISK character (*) character may be specified as one of the
+ URLs. <!-- concept-appcache-onlinewhitelist-wildcard --></p>
<p>Relative URLs must be given relative to the manifest's own
URL. All URLs in the manifest must have the same <span
@@ -59194,11 +59242,16 @@
</ol>
- <p class="note">If a resource is listed in the explicit section and
- matches an entry in the online whitelist, or if a resource matches
- both an entry in the fallback section and the online whitelist, the
- resource will taken from the cache, and the online whitelist entry
- will be ignored.</p>
+ <p class="note">If a resource is listed in the <span
+ title="concept-appcache-manifest-explicit">explicit section</span>
+ and matches an entry in the <span
+ title="concept-appcache-onlinewhitelist">online whitelist</span>, or
+ if a resource matches both an entry in the <span
+ title="concept-appcache-manifest-fallback">fallback section</span>
+ and the <span title="concept-appcache-onlinewhitelist">online
+ whitelist</span>, the resource will taken from the cache, and the
+ <span title="concept-appcache-onlinewhitelist">online
+ whitelist</span> entry will be ignored.</p>
<h4>Updating an application cache</h4>
More information about the Commit-Watchers
mailing list