hixie: appcache: Add support for '*' in the online whitelist, allowing caches to be used without failing on non-cached resources. (whatwg r3453)

hixie: appcache: Add support for '*' in the online whitelist, allowing
caches to be used without failing on non-cached resources. (whatwg
r3453)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2577&r2=1.2578&f=h
http://html5.org/tools/web-apps-tracker?from=3452&to=3453

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2577
retrieving revision 1.2578
diff -u -d -r1.2577 -r1.2578
--- Overview.html 20 Jul 2009 08:50:54 -0000 1.2577
+++ Overview.html 20 Jul 2009 22:18:50 -0000 1.2578
@@ -44145,6 +44145,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>
 
@@ -44305,10 +44308,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
@@ -44334,7 +44339,10 @@
   namespace</a> must not be listed more than once.<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>Relative URLs must be given relative to the manifest's own
+  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>Relative URLs must be given relative to the manifest's own
   URL.<p>URLs in manifests must not have fragment identifiers (i.e. the
   U+0023 NUMBER SIGN character isn't allowed in URLs in
   manifests).<div class="impl">
@@ -44367,6 +44375,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>
 
@@ -44533,9 +44544,13 @@
 
      <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>
@@ -44568,8 +44583,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
@@ -44708,8 +44724,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>
 
@@ -45017,6 +45034,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
@@ -45344,6 +45364,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
@@ -45353,8 +45378,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>

Received on Monday, 20 July 2009 22:19:50 UTC