Browse files

[gwr] (2) Appcache: Handle errors for dynamic and master entries diff…

…erently, since they aren't representative of manifest errors.

git-svn-id: http://svn.whatwg.org/webapps@2348 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 9866d15 commit 14822af4759c96204e43e73efd06d36a4172776f @Hixie Hixie committed Oct 17, 2008
Showing with 100 additions and 23 deletions.
  1. +48 −12 index
  2. +52 −11 source
View
60 index
@@ -16,7 +16,7 @@
<div class=head>
<p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<h1>HTML 5</h1>
- <h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 16 October 2008</h2>
+ <h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 17 October 2008</h2>
<p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<dl><dt>Multiple-page version:</dt>
@@ -34567,19 +34567,55 @@ style/default.css</pre>
<li>
- <p>If the previous steps fails (e.g. the server returns a 4xx or
+ <p>If the previous step fails (e.g. the server returns a 4xx or
5xx response or equivalent, or there is a DNS error, or the
connection times out, or the user cancels the download), or if
- the server returned a redirect, then run the <a href=#cache-failure-steps>cache failure
- steps</a>.</p>
-
- <p class=note>Redirects are fatal because they are either
- indicative of a network problem (e.g. a captive portal); or
- would allow resources to be added to the cache under URLs that
- differ from any URL that the networking model will allow access
- to, leaving orphan entries; or would allow resources to be
- stored under URLs different than their true URLs. All of these
- situations are bad.</p>
+ the server returned a redirect, then run the first appropriate
+ step from the following list:</p>
+
+ <dl class=switch><dt>If the URL being processed was flagged as an "explicit
+ entry" or a "fallback entry"</dt>
+
+ <dd>
+
+ <p>Run the <a href=#cache-failure-steps>cache failure steps</a>.</p>
+
+ <p class=note>Redirects are fatal because they are either
+ indicative of a network problem (e.g. a captive portal); or
+ would allow resources to be added to the cache under URLs that
+ differ from any URL that the networking model will allow
+ access to, leaving orphan entries; or would allow resources to
+ be stored under URLs different than their true URLs. All of
+ these situations are bad.</p>
+
+ </dd>
+
+ <dt>If the error was a 404 or 410 HTTP response or
+ equivalent</dt>
+
+ <dd>
+
+ <p>Skip this resource. It is dropped from the cache.</p>
+
+ </dd>
+
+ <dt>Otherwise</dt>
+
+ <dd>
+
+ <p>Copy the resource and its metadata from <var title="">cache</var>, and ignore the resource obtained from
+ the network.</p>
+
+ </dd>
+
+ </dl><p>User agents may warn the user of these errors as an aid to
+ development.</p>
+
+ <p class=note>These rules make errors for resources listed in
+ the manifest fatal, while making it possible for other resources
+ to be removed from caches when they are removed from the server,
+ without errors, and making non-manifest resources survive
+ server-side errors.
</li>
View
63 source
@@ -39256,19 +39256,60 @@ style/default.css</pre>
<li>
- <p>If the previous steps fails (e.g. the server returns a 4xx or
+ <p>If the previous step fails (e.g. the server returns a 4xx or
5xx response or equivalent, or there is a DNS error, or the
connection times out, or the user cancels the download), or if
- the server returned a redirect, then run the <span>cache failure
- steps</span>.</p>
-
- <p class="note">Redirects are fatal because they are either
- indicative of a network problem (e.g. a captive portal); or
- would allow resources to be added to the cache under URLs that
- differ from any URL that the networking model will allow access
- to, leaving orphan entries; or would allow resources to be
- stored under URLs different than their true URLs. All of these
- situations are bad.</p>
+ the server returned a redirect, then run the first appropriate
+ step from the following list:</p>
+
+ <dl class="switch">
+
+ <dt>If the URL being processed was flagged as an "explicit
+ entry" or a "fallback entry"</dt>
+
+ <dd>
+
+ <p>Run the <span>cache failure steps</span>.</p>
+
+ <p class="note">Redirects are fatal because they are either
+ indicative of a network problem (e.g. a captive portal); or
+ would allow resources to be added to the cache under URLs that
+ differ from any URL that the networking model will allow
+ access to, leaving orphan entries; or would allow resources to
+ be stored under URLs different than their true URLs. All of
+ these situations are bad.</p>
+
+ </dd>
+
+ <dt>If the error was a 404 or 410 HTTP response or
+ equivalent</dt>
+
+ <dd>
+
+ <p>Skip this resource. It is dropped from the cache.</p>
+
+ </dd>
+
+ <dt>Otherwise</dt>
+
+ <dd>
+
+ <p>Copy the resource and its metadata from <var
+ title="">cache</var>, and ignore the resource obtained from
+ the network.</p>
+
+ </dd>
+
+ </dl>
+
+ <p>User agents may warn the user of these errors as an aid to
+ development.</p>
+
+ <p class="note">These rules make errors for resources listed in
+ the manifest fatal, while making it possible for other resources
+ to be removed from caches when they are removed from the server,
+ without errors, and making non-manifest resources survive
+ server-side errors.
</li>

0 comments on commit 14822af

Please sign in to comment.