[html5] r3453 - [gw] (2) appcache: Add support for '*' in the online whitelist, allowing caches [...]
whatwg at whatwg.org
whatwg at whatwg.org
Mon Jul 20 15:18:45 PDT 2009
Author: ianh
Date: 2009-07-20 15:18:44 -0700 (Mon, 20 Jul 2009)
New Revision: 3453
Modified:
index
source
Log:
[gw] (2) appcache: Add support for '*' in the online whitelist, allowing caches to be used without failing on non-cached resources.
Modified: index
===================================================================
--- index 2009-07-20 08:50:47 UTC (rev 3452)
+++ index 2009-07-20 22:18:44 UTC (rev 3453)
@@ -49146,6 +49146,9 @@
<li>Zero or more URLs that form the <dfn id=concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist
namespaces</dfn>.
+ <li>An <dfn id=concept-appcache-onlinewhitelist-wildcard title=concept-appcache-onlinewhitelist-wildcard>online whitelist
+ wildcard flag</dfn>, which is either <i title="">open</i> or <i title="">blocking</i>.</li>
+
</ul><p>Each <a href=#application-cache>application cache</a> has a <dfn id=concept-appcache-completeness title=concept-appcache-completeness>completeness flag</dfn>, which is
either <i>complete</i> or <i>incomplete</i>.</p>
@@ -49333,10 +49336,12 @@
<p>When the current section is the explicit section or the online
whitelist 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>
+ 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
@@ -49370,7 +49375,10 @@
<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.)</p>
+ 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.</p>
@@ -49410,6 +49418,9 @@
initially empty list of URLs for a <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
whitelist</a>.</li>
+ <li><p>Let <var title="">online whitelist wildcard flag</var> be <i title="">blocking</i>. <!--
+ concept-appcache-onlinewhitelist-wildcard --></li>
+
<li><p>Let <var title="">input</var> be the decoded text of the
manifest's byte stream.</li>
@@ -49576,10 +49587,14 @@
<dd>
- <p><a href=#resolve-a-url title="resolve a url">Resolve</a> the first item in
- <var title="">tokens</var>, relative to <var title="">base
- URL</var>; ignore the rest.</p>
+ <p>If the first item in <var title="">tokens</var> is a U+002A
+ ASTERISK character (*), then set <var title="">online whitelist
+ wildcard flag</var> to <i title="">open</i> and jump back to the
+ step labeled "start of line".</p>
+ <p>Otherwise, <a href=#resolve-a-url title="resolve a url">resolve</a> the
+ first item in <var title="">tokens</var>, relative to <var title="">base URL</var>; ignore the rest.</p>
+
<p>If this fails, then jump back to the step labeled "start of
line".</p>
@@ -49611,8 +49626,9 @@
jumps to the next, and last, step when the end of the file is
reached.)</li>
- <li><p>Return the <var title="">explicit URLs</var> list, the <var title="">fallback URLs</var> mapping, and the <var title="">online
- whitelist URLs</var>.</li>
+ <li><p>Return the <var title="">explicit URLs</var> list, the <var title="">fallback URLs</var> mapping, the <var title="">online
+ 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
@@ -49751,8 +49767,9 @@
<a href=#concept-appcache-explicit title=concept-appcache-explicit>explicit entries</a>,
<a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a>
and the <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback
- namespaces</a> that map to them, and entries for the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
- whitelist</a>.</p>
+ namespaces</a> that map to them, entries for the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a>,
+ and a value for the <a href=#concept-appcache-onlinewhitelist-wildcard title=concept-appcache-onlinewhitelist-wildcard>online whitelist
+ wildcard flag</a>.</p>
</li>
@@ -50060,6 +50077,9 @@
<li><p>Store the URLs that form the new <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a> in
<var title="">new cache</var>.</li>
+ <li><p>Store the value of the new <a href=#concept-appcache-onlinewhitelist-wildcard title=concept-appcache-onlinewhitelist-wildcard>online whitelist
+ wildcard flag</a> in <var title="">new cache</var>.</li>
+
<li>
<p>For each entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
@@ -50387,6 +50407,11 @@
</li>
+ <li><p>If the <a href=#application-cache>application cache</a>'s <a href=#concept-appcache-onlinewhitelist-wildcard title=concept-appcache-onlinewhitelist-wildcard>online whitelist
+ wildcard flag</a> is <i title="">open</i>, then
+ <a href=#fetch>fetch</a> the resource normally and abort these
+ steps.</li>
+
<li><p>If there is an entry in the <a href=#application-cache>application cache</a>'s
<a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
whitelist</a> that has the <a href=#same-origin>same origin</a> as the
@@ -50396,8 +50421,10 @@
<li><p>Fail the resource load.</li>
- </ol><p class=note>The above algorithm ensures that resources that are
- not present in the <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> will always fail
+ </ol><p class=note>The above algorithm ensures that so long as the
+ <a href=#concept-appcache-onlinewhitelist-wildcard title=concept-appcache-onlinewhitelist-wildcard>online
+ whitelist wildcard flag</a> is <i title="">blocking</i>,
+ resources that are not present in the <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> will always fail
to load (at least, after the <a href=#application-cache>application cache</a> has been
primed the first time), making the testing of offline applications
simpler.</p>
Modified: source
===================================================================
--- source 2009-07-20 08:50:47 UTC (rev 3452)
+++ source 2009-07-20 22:18:44 UTC (rev 3453)
@@ -55892,6 +55892,11 @@
title="concept-appcache-onlinewhitelist">online whitelist
namespaces</dfn>.
+ <li>An <dfn
+ title="concept-appcache-onlinewhitelist-wildcard">online whitelist
+ wildcard flag</dfn>, which is either <i title="">open</i> or <i
+ title="">blocking</i>.</li>
+
</ul>
<p>Each <span>application cache</span> has a <dfn
@@ -56112,10 +56117,12 @@
<p>When the current section is the explicit section or the online
whitelist 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>
+ 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
@@ -56154,7 +56161,10 @@
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.)</p>
+ 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.</p>
@@ -56198,6 +56208,10 @@
title="concept-appcache-onlinewhitelist">online
whitelist</span>.</p></li>
+ <li><p>Let <var title="">online whitelist wildcard flag</var> be <i
+ title="">blocking</i>. <!--
+ concept-appcache-onlinewhitelist-wildcard --></p></li>
+
<li><p>Let <var title="">input</var> be the decoded text of the
manifest's byte stream.</p></li>
@@ -56394,10 +56408,15 @@
<dd>
- <p><span title="resolve a url">Resolve</span> the first item in
- <var title="">tokens</var>, relative to <var title="">base
- URL</var>; ignore the rest.</p>
+ <p>If the first item in <var title="">tokens</var> is a U+002A
+ ASTERISK character (*), then set <var title="">online whitelist
+ wildcard flag</var> to <i title="">open</i> and jump back to the
+ step labeled "start of line".</p>
+ <p>Otherwise, <span title="resolve a url">resolve</span> the
+ first item in <var title="">tokens</var>, relative to <var
+ title="">base URL</var>; ignore the rest.</p>
+
<p>If this fails, then jump back to the step labeled "start of
line".</p>
@@ -56433,8 +56452,9 @@
reached.)</p></li>
<li><p>Return the <var title="">explicit URLs</var> list, the <var
- title="">fallback URLs</var> mapping, and the <var title="">online
- whitelist URLs</var>.</p></li>
+ title="">fallback URLs</var> mapping, the <var title="">online
+ whitelist URLs</var>, and the <var title="">online whitelist
+ wildcard flag</var>.</p></li>
</ol>
@@ -56605,9 +56625,11 @@
<span title="concept-appcache-explicit">explicit entries</span>,
<span title="concept-appcache-fallback">fallback entries</span>
and the <span title="concept-appcache-fallback-ns">fallback
- namespaces</span> that map to them, and entries for the <span
- title="concept-appcache-onlinewhitelist">online
- whitelist</span>.</p>
+ namespaces</span> that map to them, entries for the <span
+ title="concept-appcache-onlinewhitelist">online whitelist</span>,
+ and a value for the <span
+ title="concept-appcache-onlinewhitelist-wildcard">online whitelist
+ wildcard flag</span>.</p>
</li>
@@ -56969,6 +56991,10 @@
title="concept-appcache-onlinewhitelist">online whitelist</span> in
<var title="">new cache</var>.</p></li>
+ <li><p>Store the value of the new <span
+ title="concept-appcache-onlinewhitelist-wildcard">online whitelist
+ wildcard flag</span> in <var title="">new cache</var>.</p></li>
+
<li>
<p>For each entry in <var title="">cache group</var>'s <span
@@ -57356,6 +57382,12 @@
</li>
+ <li><p>If the <span>application cache</span>'s <span
+ title="concept-appcache-onlinewhitelist-wildcard">online whitelist
+ wildcard flag</span> is <i title="">open</i>, then
+ <span>fetch</span> the resource normally and abort these
+ steps.</p></li>
+
<li><p>If there is an entry in the <span>application cache</span>'s
<span title="concept-appcache-onlinewhitelist">online
whitelist</span> that has the <span>same origin</span> as the
@@ -57367,8 +57399,10 @@
</ol>
- <p class="note">The above algorithm ensures that resources that are
- not present in the <span
+ <p class="note">The above algorithm ensures that so long as the
+ <span title="concept-appcache-onlinewhitelist-wildcard">online
+ whitelist wildcard flag</span> is <i title="">blocking</i>,
+ resources that are not present in the <span
title="concept-appcache-manifest">manifest</span> will always fail
to load (at least, after the <span>application cache</span> has been
primed the first time), making the testing of offline applications
More information about the Commit-Watchers
mailing list