[html5] r7563 - [e] (0) Update references and cleanup. Fixing https://www.w3.org/Bugs/Public/sho [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue Dec 4 16:19:20 PST 2012
Author: ianh
Date: 2012-12-04 16:19:19 -0800 (Tue, 04 Dec 2012)
New Revision: 7563
Modified:
complete.html
index
source
Log:
[e] (0) Update references and cleanup.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=18870
Affected topics: HTML, Offline Web Applications
Modified: complete.html
===================================================================
--- complete.html 2012-12-04 23:55:58 UTC (rev 7562)
+++ complete.html 2012-12-05 00:19:19 UTC (rev 7563)
@@ -248,7 +248,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 4 December 2012</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 5 December 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -71066,379 +71066,303 @@
<h4 id=downloading-or-updating-an-application-cache><span class=secno>6.7.4 </span>Downloading or updating an application cache</h4>
- <p>When the user agent is required (by other parts of this
- specification) to start the <dfn id=application-cache-download-process>application cache download
- process</dfn> for an <a href=#absolute-url>absolute URL</a> purported to identify
- a <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>, or for an
- <a href=#application-cache-group>application cache group</a>, potentially given a particular
- <a href=#cache-host>cache host</a>, and potentially given a <a href=#concept-appcache-master title=concept-appcache-master>master</a> resource, the user
- agent must run the steps below. These steps are always run
- asynchronously, in parallel with the <a href=#event-loop>event loop</a> <a href=#concept-task title=concept-task>tasks</a>.</p>
+ <p>When the user agent is required (by other parts of this specification) to start the
+ <dfn id=application-cache-download-process>application cache download process</dfn> for an <a href=#absolute-url>absolute URL</a> purported to
+ identify a <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>, or for an <a href=#application-cache-group>application
+ cache group</a>, potentially given a particular <a href=#cache-host>cache host</a>, and potentially given
+ a <a href=#concept-appcache-master title=concept-appcache-master>master</a> resource, the user agent must run the steps
+ below. These steps are always run asynchronously, in parallel with the <a href=#event-loop>event loop</a>
+ <a href=#concept-task title=concept-task>tasks</a>.</p>
- <p>Some of these steps have requirements that only apply if the user
- agent <dfn id=shows-caching-progress>shows caching progress</dfn>. Support for this is
- optional. Caching progress UI could consist of a progress bar or
- message panel in the user agent's interface, or an overlay, or
- something else. Certain events fired during the <a href=#application-cache-download-process>application
- cache download process</a> allow the script to override the display
- of such an interface. The goal of this is to allow Web applications
- to provide more seamless update mechanisms, hiding from the user the
- mechanics of the application cache mechanism. User agents may
- display user interfaces independent of this, but are encouraged to
- not show prominent update progress notifications for applications
- that cancel the relevant events.</p>
+ <p>Some of these steps have requirements that only apply if the user agent <dfn id=shows-caching-progress>shows caching
+ progress</dfn>. Support for this is optional. Caching progress UI could consist of a progress bar
+ or message panel in the user agent's interface, or an overlay, or something else. Certain events
+ fired during the <a href=#application-cache-download-process>application cache download process</a> allow the script to override the
+ display of such an interface. The goal of this is to allow Web applications to provide more
+ seamless update mechanisms, hiding from the user the mechanics of the application cache mechanism.
+ User agents may display user interfaces independent of this, but are encouraged to not show
+ prominent update progress notifications for applications that cancel the relevant events.</p>
<p class=note>These events are delayed until after the <code title=event-load>load</code> event has fired.</p>
- <p>The <a href=#application-cache-download-process>application cache download process</a> steps are as
- follows:
+ <p>The <a href=#application-cache-download-process>application cache download process</a> steps are as follows:
- <ol><li><p>Optionally, wait until the permission to start the
- <a href=#application-cache-download-process>application cache download process</a> has been obtained
- from the user and until the user agent is confident that the
- network is available. This could include doing nothing until the
- user explicitly opts-in to caching the site, or could involve
- prompting the user for permission. The algorithm might never get
- past this point. (This step is particularly intended to be used by
- user agents running on severely space-constrained devices or in
- highly privacy-sensitive environments).</li>
+ <ol><li><p>Optionally, wait until the permission to start the <a href=#application-cache-download-process>application cache download
+ process</a> has been obtained from the user and until the user agent is confident that the
+ network is available. This could include doing nothing until the user explicitly opts-in to
+ caching the site, or could involve prompting the user for permission. The algorithm might never
+ get past this point. (This step is particularly intended to be used by user agents running on
+ severely space-constrained devices or in highly privacy-sensitive environments).</li>
<li>
- <p>Atomically, so as to avoid race conditions, perform the
- following substeps:</p>
+ <p>Atomically, so as to avoid race conditions, perform the following substeps:</p>
<ol><li>
<p>Pick the appropriate substeps:</p>
- <dl class=switch><dt>If these steps were invoked with an <a href=#absolute-url>absolute
- URL</a> purported to identify a <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a></dt>
+ <dl class=switch><dt>If these steps were invoked with an <a href=#absolute-url>absolute URL</a> purported to identify a
+ <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a></dt>
<dd>
- <p>Let <var title="">manifest URL</var> be that <a href=#absolute-url>absolute
- URL</a>.</p>
+ <p>Let <var title="">manifest URL</var> be that <a href=#absolute-url>absolute URL</a>.</p>
- <p>If there is no <a href=#application-cache-group>application cache group</a>
- identified by <var title="">manifest URL</var>, then create a
- new <a href=#application-cache-group>application cache group</a> identified by <var title="">manifest URL</var>. Initially, it has no <a href=#application-cache title="application cache">application caches</a>. One will
- be created later in this algorithm.</p>
+ <p>If there is no <a href=#application-cache-group>application cache group</a> identified by <var title="">manifest
+ URL</var>, then create a new <a href=#application-cache-group>application cache group</a> identified by <var title="">manifest URL</var>. Initially, it has no <a href=#application-cache title="application
+ cache">application caches</a>. One will be created later in this algorithm.</p>
</dd>
- <dt>If these steps were invoked with an <a href=#application-cache-group>application cache
- group</a></dt>
+ <dt>If these steps were invoked with an <a href=#application-cache-group>application cache group</a></dt>
<dd>
- <p>Let <var title="">manifest URL</var> be the <a href=#absolute-url>absolute
- URL</a> of the <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> used to
- identify the <a href=#application-cache-group>application cache group</a> to be
- updated.</p>
+ <p>Let <var title="">manifest URL</var> be the <a href=#absolute-url>absolute URL</a> of the <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> used to identify the <a href=#application-cache-group>application
+ cache group</a> to be updated.</p>
- <p>If that <a href=#application-cache-group>application cache group</a> is <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>, then abort
- this instance of the <a href=#application-cache-download-process>application cache download
- process</a>. This can happen if another instance of this
- algorithm found the manifest to be 404 or 410 while this
- algorithm was waiting in the first step above.</p>
+ <p>If that <a href=#application-cache-group>application cache group</a> is <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>, then abort this instance of the
+ <a href=#application-cache-download-process>application cache download process</a>. This can happen if another instance of this
+ algorithm found the manifest to be 404 or 410 while this algorithm was waiting in the first
+ step above.</p>
</dd>
</dl></li>
- <li><p>Let <var title="">cache group</var> be the
- <a href=#application-cache-group>application cache group</a> identified by <var title="">manifest URL</var>.</li>
+ <li><p>Let <var title="">cache group</var> be the <a href=#application-cache-group>application cache group</a>
+ identified by <var title="">manifest URL</var>.</li>
- <li><p>If these steps were invoked with a <a href=#concept-appcache-master title=concept-appcache-master>master</a> resource, then add
- the resource, along with the resource's <code><a href=#document>Document</a></code>, to
- <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
- entries</a>.</li>
+ <li><p>If these steps were invoked with a <a href=#concept-appcache-master title=concept-appcache-master>master</a>
+ resource, then add the resource, along with the resource's <code><a href=#document>Document</a></code>, to <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending
+ master entries</a>.</li>
- <li><p>If these steps were invoked with a <a href=#cache-host>cache
- host</a>, and the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> is <i>checking</i> or
- <i>downloading</i>, then <a href=#queue-a-post-load-task>queue a post-load task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> that is
- cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that
- <a href=#cache-host>cache host</a>. The default action of this event must
- be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
- display of some sort of user interface indicating to the user
- that the user agent is checking to see if it can download the
- application.</li>
+ <li><p>If these steps were invoked with a <a href=#cache-host>cache host</a>, and the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> is
+ <i>checking</i> or <i>downloading</i>, then <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a
+ simple event</a> named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> that is
+ cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that <a href=#cache-host>cache host</a>. The
+ default action of this event must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>,
+ the display of some sort of user interface indicating to the user that the user agent is
+ checking to see if it can download the application.</li>
- <li><p>If these steps were invoked with a <a href=#cache-host>cache
- host</a>, and the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> is <i>downloading</i>, then also
- <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
+ <li><p>If these steps were invoked with a <a href=#cache-host>cache host</a>, and the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> is
+ <i>downloading</i>, then also <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-appcache-downloading><a href=#event-appcache-downloading>downloading</a></code> that is
- cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that
- <a href=#cache-host>cache host</a>. The default action of this event must
- be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
- display of some sort of user interface indicating to the user the
- application is being downloaded.</li>
+ cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that <a href=#cache-host>cache host</a>. The
+ default action of this event must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>,
+ the display of some sort of user interface indicating to the user the application is being
+ downloaded.</li>
- <li><p>If the <a href=#concept-appcache-status title=concept-appcache-status>status</a>
- of the <var title="">cache group</var> is either <i>checking</i>
- or <i>downloading</i>, then abort this instance of the
- <a href=#application-cache-download-process>application cache download process</a>, as an update is
- already in progress.</li>
+ <li><p>If the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of the <var title="">cache
+ group</var> is either <i>checking</i> or <i>downloading</i>, then abort this instance of the
+ <a href=#application-cache-download-process>application cache download process</a>, as an update is already in progress.</li>
- <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> to <i>checking</i>.</p>
+ <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache
+ group</var> to <i>checking</i>.</p>
- <li><p>For each <a href=#cache-host>cache host</a> associated with an
- <a href=#application-cache>application cache</a> in <var title="">cache
- group</var>, <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a
- simple event</a> that is cancelable named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>. The default action of these events must be, if the
- user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
- some sort of user interface indicating to the user that the user
- agent is checking for the availability of updates.</li>
+ <li><p>For each <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in
+ <var title="">cache group</var>, <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
+ event</a> that is cancelable named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> at
+ the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>. The default action
+ of these events must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
+ some sort of user interface indicating to the user that the user agent is checking for the
+ availability of updates.</li>
</ol><p class=note>The remainder of the steps run asynchronously.</p>
- <p>If <var title="">cache group</var> already has an
- <a href=#application-cache>application cache</a> in it, then this is an <dfn id=concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</dfn>. Otherwise,
- this is a <dfn id=concept-appcache-cache title=concept-appcache-cache>cache
- attempt</dfn>.</p>
+ <p>If <var title="">cache group</var> already has an <a href=#application-cache>application cache</a> in it, then
+ this is an <dfn id=concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</dfn>. Otherwise, this is a
+ <dfn id=concept-appcache-cache title=concept-appcache-cache>cache attempt</dfn>.</p>
</li>
- <li><p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
- attempt</a>, then this algorithm was invoked with a <a href=#cache-host>cache
- host</a>; <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a
- simple event</a> named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> that is cancelable
- at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that <a href=#cache-host>cache
- host</a>. The default action of this event must be, if the user
- agent <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort
- of user interface indicating to the user that the user agent is
- checking for the availability of updates.</li>
+ <li><p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache attempt</a>, then this
+ algorithm was invoked with a <a href=#cache-host>cache host</a>; <a href=#queue-a-post-load-task>queue a post-load task</a> to
+ <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> that
+ is cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that <a href=#cache-host>cache host</a>. The
+ default action of this event must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
+ display of some sort of user interface indicating to the user that the user agent is checking for
+ the availability of updates.</li>
<li>
- <p><i>Fetching the manifest</i>: <a href=#fetch>Fetch</a><!--FETCH-->
- the resource from <var title="">manifest URL</var> with the
- <i>synchronous flag</i> set, and let <var title="">manifest</var>
- be that resource. HTTP caching semantics should be honored for
- this request.</p> <!-- http-origin privacy sensitive, though it
- doesn't matter, since this can never be cross-origin -->
+ <p><i>Fetching the manifest</i>: <a href=#fetch>Fetch</a><!--FETCH--> the resource from <var title="">manifest URL</var> with the <i>synchronous flag</i> set, and let <var title="">manifest</var> be that resource. HTTP caching semantics should be honored for this
+ request.</p> <!-- http-origin privacy sensitive, though it doesn't matter, since this can never
+ be cross-origin -->
- <p>Parse <var title="">manifest</var> according to the <a href=#parse-a-manifest title="parse a manifest">rules for parsing manifests</a>,
- obtaining a list of <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, entries for the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a>,
- and values for the <a href=#concept-appcache-onlinewhitelist-wildcard title=concept-appcache-onlinewhitelist-wildcard>online whitelist
- wildcard flag</a> and the <a href=#concept-appcache-mode title=concept-appcache-mode>cache mode flag</a>.</p>
+ <p>Parse <var title="">manifest</var> according to the <a href=#parse-a-manifest title="parse a manifest">rules for
+ parsing manifests</a>, obtaining a list of <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, entries for
+ the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a>, and values for the
+ <a href=#concept-appcache-onlinewhitelist-wildcard title=concept-appcache-onlinewhitelist-wildcard>online whitelist wildcard flag</a>
+ and the <a href=#concept-appcache-mode title=concept-appcache-mode>cache mode flag</a>.</p>
- <p class=note>The <a href=#mime-type>MIME type</a> of the resource is
- ignored — it is assumed to be
- <code><a href=#text/cache-manifest>text/cache-manifest</a></code>. In the future, if new manifest
- formats are supported, the different types will probably be
- distinguished on the basis of the file signatures (for the current
- format, that is the "<code title="">CACHE MANIFEST</code>"
- string at the top of the file).</p>
+ <p class=note>The <a href=#mime-type>MIME type</a> of the resource is ignored — it is assumed to
+ be <code><a href=#text/cache-manifest>text/cache-manifest</a></code>. In the future, if new manifest formats are supported, the
+ different types will probably be distinguished on the basis of the file signatures (for the
+ current format, that is the "<code title="">CACHE MANIFEST</code>" string at the top of the
+ file).</p>
</li>
<li>
- <p>If <i>fetching the manifest</i> fails due to a 404 or 410
- response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
- equivalent</a>, then run these substeps:</p>
+ <p>If <i>fetching the manifest</i> fails due to a 404 or 410 response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, then run these substeps:</p>
- <ol><li><p>Mark <var title="">cache group</var> as <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>. This <var title="">cache group</var> no longer exists for any purpose other
- than the processing of <code><a href=#document>Document</a></code> objects already
- associated with an <a href=#application-cache>application cache</a> in the <var title="">cache group</var>.</li>
+ <ol><li><p>Mark <var title="">cache group</var> as <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>. This <var title="">cache group</var> no
+ longer exists for any purpose other than the processing of <code><a href=#document>Document</a></code> objects
+ already associated with an <a href=#application-cache>application cache</a> in the <var title="">cache
+ group</var>.</li>
- <li><p>Let <var title="">task list</var> be an empty list of
- <a href=#concept-task title=concept-task>tasks</a>.</p>
+ <li><p>Let <var title="">task list</var> be an empty list of <a href=#concept-task title=concept-task>tasks</a>.</p>
- <li><p>For each <a href=#cache-host>cache host</a> associated with an
- <a href=#application-cache>application cache</a> in <var title="">cache
- group</var>, create a <a href=#concept-task title=concept-task>task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code> that is
- cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
- <a href=#cache-host>cache host</a>, and append it to <var title="">task
- list</var>. The default action of these events must be, if the
- user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
- some sort of user interface indicating to the user that the
- application is no longer available for offline use.</li>
+ <li><p>For each <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in
+ <var title="">cache group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire
+ a simple event</a> named <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code> that is
+ cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>, and
+ append it to <var title="">task list</var>. The default action of these events must be, if the
+ user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface
+ indicating to the user that the application is no longer available for offline use.</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
- entries</a>, create a <a href=#concept-task title=concept-task>task</a>
- to <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named
- <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> (not <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code>!) at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
- <code><a href=#document>Document</a></code> for this entry, if there still is one, and
- append it to <var title="">task list</var>. The default action of
- this event must be, if the user agent <a href=#shows-caching-progress>shows caching
- progress</a>, the display of some sort of user interface
- indicating to the user that the user agent failed to save the
- application for offline use.</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 entries</a>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named
+ <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> (not <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code>!) at the <code><a href=#applicationcache>ApplicationCache</a></code>
+ singleton of the <code><a href=#document>Document</a></code> for this entry, if there still is one, and append it to
+ <var title="">task list</var>. The default action of this event must be, if the user agent
+ <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to
+ the user that the user agent failed to save the application for offline use.</li>
- <li><p>If <var title="">cache group</var> has an
- <a href=#application-cache>application cache</a> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is
- <i>incomplete</i>, then discard that <a href=#application-cache>application
- cache</a>.</p>
+ <li><p>If <var title="">cache group</var> has an <a href=#application-cache>application cache</a> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is <i>incomplete</i>, then
+ discard that <a href=#application-cache>application cache</a>.</p>
- <li><p>If appropriate, remove any user interface indicating that
- an update for this cache is in progress.</li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</li>
- <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> be <i>idle</i>.</li>
+ <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache
+ group</var> be <i>idle</i>.</li>
- <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load
- task">queue that task as a post-load task</a>.</li>
+ <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load task">queue that task as a post-load task</a>.</li>
- <li><p>Abort the <a href=#application-cache-download-process>application cache download
- process</a>.</li>
+ <li><p>Abort the <a href=#application-cache-download-process>application cache download process</a>.</li>
</ol></li>
<li>
- <p>Otherwise, if <i>fetching the manifest</i> fails in some other
- way (e.g. the server returns another 4xx or 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, or
- there is a DNS error, or the connection times out, or the user
- cancels the download, or the parser for manifests fails when
- checking the magic signature), or if the server returned a
+ <p>Otherwise, if <i>fetching the manifest</i> fails in some other way (e.g. the server returns
+ another 4xx or 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, or
+ there is a DNS error, or the connection times out, or the user cancels the download, or the
+ parser for manifests fails when checking the magic signature), or if the server returned a
redirect, then run the <a href=#cache-failure-steps>cache failure steps</a>. <a href=#refsHTTP>[HTTP]</a></p>
</li>
<li>
- <p>If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade
- attempt</a> and the newly downloaded <var title="">manifest</var> is byte-for-byte identical to the manifest
- found in the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a>
- <a href=#application-cache>application cache</a> in <var title="">cache group</var>,
- or the server reported it as "304 Not Modified" <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, then
- run these substeps:</p>
+ <p>If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a> and the newly
+ downloaded <var title="">manifest</var> is byte-for-byte identical to the manifest found in the
+ <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application cache</a> in <var title="">cache group</var>, or the server reported it as "304 Not Modified" <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, then run these substeps:</p>
- <ol><li><p>Let <var title="">cache</var> be the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application
- cache</a> in <var title="">cache group</var>.</li>
+ <ol><li><p>Let <var title="">cache</var> be the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a>
+ <a href=#application-cache>application cache</a> in <var title="">cache group</var>.</li>
- <li><p>Let <var title="">task list</var> be an empty list of
- <a href=#concept-task title=concept-task>tasks</a>.</p>
+ <li><p>Let <var title="">task list</var> be an empty list of <a href=#concept-task title=concept-task>tasks</a>.</p>
<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
- entries</a>, wait for the resource for this entry to have
- either completely downloaded or failed.</p>
+ <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 entries</a>, wait for the
+ resource for this entry to have either completely downloaded or failed.</p>
- <p>If the download failed (e.g. the server returns a 4xx or 5xx
- response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
- equivalent</a>, or there is a DNS error, the connection times
- out, or the user cancels the download), or if the resource is
- labeled with the "no-store" cache directive, then create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
- <code><a href=#document>Document</a></code> for this entry, if there still is one, and
- append it to <var title="">task list</var>. The default action
- of this event must be, if the user agent <a href=#shows-caching-progress>shows caching
- progress</a>, the display of some sort of user interface
- indicating to the user that the user agent failed to save the
- application for offline use.</p>
+ <p>If the download failed (e.g. the server returns a 4xx or 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, or there is a DNS error, the
+ connection times out, or the user cancels the download), or if the resource is labeled with
+ the "no-store" cache directive, then create a <a href=#concept-task title=concept-task>task</a> to
+ <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of
+ the <code><a href=#document>Document</a></code> for this entry, if there still is one, and append it to <var title="">task list</var>. The default action of this event must be, if the user agent
+ <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to
+ the user that the user agent failed to save the application for offline use.</p>
- <p>Otherwise, associate the <code><a href=#document>Document</a></code> for this entry
- with <var title="">cache</var>; store the resource for this
- entry in <var title="">cache</var>, if it isn't already there,
- and categorize its entry as a <a href=#concept-appcache-master title=concept-appcache-master>master entry</a>. If the
- resource's <a href=#url>URL</a> has a <a href=#url-fragment title=url-fragment><fragment></a> component, it must
- be removed from the entry in <var title="">cache</var>
- (application caches never include fragment identifiers).</p>
+ <p>Otherwise, associate the <code><a href=#document>Document</a></code> for this entry with <var title="">cache</var>; store the resource for this entry in <var title="">cache</var>, if it
+ isn't already there, and categorize its entry as a <a href=#concept-appcache-master title=concept-appcache-master>master entry</a>. If the resource's <a href=#url>URL</a> has a
+ <a href=#url-fragment title=url-fragment><fragment></a> component, it must be removed from the
+ entry in <var title="">cache</var> (application caches never include fragment
+ identifiers).</p>
</li>
- <li><p>For each <a href=#cache-host>cache host</a> associated with an
- <a href=#application-cache>application cache</a> in <var title="">cache
- group</var>, create a <a href=#concept-task title=concept-task>task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-noupdate><a href=#event-appcache-noupdate>noupdate</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
- user interface indicating to the user that the application is up
- to date.</li>
+ <li><p>For each <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in
+ <var title="">cache group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire
+ a simple event</a> that is cancelable named <code title=event-appcache-noupdate><a href=#event-appcache-noupdate>noupdate</a></code> at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton
+ of the <a href=#cache-host>cache host</a>, and append it to <var title="">task list</var>. The default
+ action of these events must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
+ display of some sort of user interface indicating to the user that the application is up to
+ date.</li>
- <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
- entries</a>.</li>
+ <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master entries</a>.</li>
- <li><p>If appropriate, remove any user interface indicating that
- an update for this cache is in progress.</li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</li>
- <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> be <i>idle</i>.</li>
+ <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache
+ group</var> be <i>idle</i>.</li>
- <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load
- task">queue that task as a post-load task</a>.</li>
+ <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load task">queue that task as a post-load task</a>.</li>
- <li><p>Abort the <a href=#application-cache-download-process>application cache download
- process</a>.</li>
+ <li><p>Abort the <a href=#application-cache-download-process>application cache download process</a>.</li>
</ol></li>
- <li><p>Let <var title="">new cache</var> be a newly created
- <a href=#application-cache>application cache</a> in <var title="">cache
- group</var>. Set its <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> to
- <i>incomplete</i>.</li>
+ <li><p>Let <var title="">new cache</var> be a newly created <a href=#application-cache>application cache</a> in
+ <var title="">cache group</var>. Set its <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness
+ flag</a> to <i>incomplete</i>.</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
- entries</a>, associate the <code><a href=#document>Document</a></code> for this entry
- with <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 entries</a>, associate the
+ <code><a href=#document>Document</a></code> for this entry with <var title="">new cache</var>.</li>
- <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a>
- of <var title="">cache group</var> to <i>downloading</i>.</li>
+ <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache
+ group</var> to <i>downloading</i>.</li>
- <li><p>For each <a href=#cache-host>cache host</a> associated with an
- <a href=#application-cache>application cache</a> in <var title="">cache group</var>,
- <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> that is cancelable named <code title=event-appcache-downloading><a href=#event-appcache-downloading>downloading</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>. The default action of these events must be, if the
- user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of some
- sort of user interface indicating to the user that a new version is
- being downloaded.</li>
+ <li><p>For each <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in <var title="">cache group</var>, <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
+ event</a> that is cancelable named <code title=event-appcache-downloading><a href=#event-appcache-downloading>downloading</a></code>
+ at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>. The default action
+ of these events must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
+ some sort of user interface indicating to the user that a new version is being
+ downloaded.</li>
- <li><p>Let <var title="">file list</var> be an empty list of
- URLs with flags.</li>
+ <li><p>Let <var title="">file list</var> be an empty list of URLs with flags.</li>
- <li><p>Add all the URLs in the list of <a href=#concept-appcache-explicit title=concept-appcache-explicit>explicit entries</a> obtained
- by parsing <var title="">manifest</var> to <var title="">file
- list</var>, each flagged with "explicit entry".</li>
+ <li><p>Add all the URLs in the list of <a href=#concept-appcache-explicit title=concept-appcache-explicit>explicit
+ entries</a> obtained by parsing <var title="">manifest</var> to <var title="">file list</var>,
+ each flagged with "explicit entry".</li>
- <li><p>Add all the URLs in the list of <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a> obtained
- by parsing <var title="">manifest</var> to <var title="">file
- list</var>, each flagged with "fallback entry".</li>
+ <li><p>Add all the URLs in the list of <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback
+ entries</a> obtained by parsing <var title="">manifest</var> to <var title="">file list</var>,
+ each flagged with "fallback entry".</li>
- <li><p>If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade
- attempt</a>, then add all the URLs of <a href=#concept-appcache-master title=concept-appcache-master>master entries</a> in the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application
- cache</a> in <var title="">cache group</var> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is
- <i>complete</i> to <var title="">file list</var>, each flagged with
- "master entry".</li>
+ <li><p>If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>, then add all
+ the URLs of <a href=#concept-appcache-master title=concept-appcache-master>master entries</a> in the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application cache</a> in <var title="">cache group</var> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness
+ flag</a> is <i>complete</i> to <var title="">file list</var>, each flagged with "master
+ entry".</li>
- <li><p>If any URL is in <var title="">file list</var> more than
- once, then merge the entries into one entry for that URL, that
- entry having all the flags that the original entries had.</li>
+ <li><p>If any URL is in <var title="">file list</var> more than once, then merge the entries into
+ one entry for that URL, that entry having all the flags that the original entries had.</li>
<li>
- <p>For each URL in <var title="">file list</var>, run the
- following steps. These steps may be run in parallel for two or
- more of the URLs at a time. If, while running these steps, the
- <code><a href=#applicationcache>ApplicationCache</a></code> object's <code title=dom-appcache-abort><a href=#dom-appcache-abort>abort()</a></code> method <a href=#send-a-signal title="send
- a signal">sends a signal</a> to this instance of the
- <a href=#application-cache-download-process>application cache download process</a> algorithm, then
- run the <a href=#cache-failure-steps>cache failure steps</a> instead.</p>
+ <p>For each URL in <var title="">file list</var>, run the following steps. These steps may be
+ run in parallel for two or more of the URLs at a time. If, while running these steps, the
+ <code><a href=#applicationcache>ApplicationCache</a></code> object's <code title=dom-appcache-abort><a href=#dom-appcache-abort>abort()</a></code> method
+ <a href=#send-a-signal title="send a signal">sends a signal</a> to this instance of the <a href=#application-cache-download-process>application
+ cache download process</a> algorithm, then run the <a href=#cache-failure-steps>cache failure steps</a>
+ instead.</p>
<ol><li>
- <p>If the resource URL being processed was flagged as neither an
- "explicit entry" nor or a "fallback entry", then the user agent
- may skip this URL.</p>
+ <p>If the resource URL being processed was flagged as neither an "explicit entry" nor or a
+ "fallback entry", then the user agent may skip this URL.</p>
- <p class=note>This is intended to allow user agents to expire
- resources not listed in the manifest from the cache. Generally,
- implementors are urged to use an approach that expires
+ <p class=note>This is intended to allow user agents to expire resources not listed in the
+ manifest from the cache. Generally, implementors are urged to use an approach that expires
lesser-used resources first.</p>
</li>
@@ -71453,70 +71377,54 @@
<var title="">file list</var> that have been either downloaded or skipped so far. The default
action of these events must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
display of some sort of user interface indicating to the user that a file is being downloaded
- in preparation for updating the application. <a href=#refsPROGRESS>[PROGRESS]</a></li>
+ in preparation for updating the application. <a href=#refsXHR>[XHR]</a></li>
<li>
- <p><a href=#fetch>Fetch</a><!--FETCH--> the resource, from the
- <a href=#origin>origin</a> of the <a href=#url>URL</a> <var title="">manifest URL</var>, with the <i>synchronous flag</i>
- set and the <i>manual redirect flag</i> set. If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>, then
- use the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a>
- <a href=#application-cache>application cache</a> in <var title="">cache
- group</var> as an HTTP cache, and honor HTTP caching semantics
- (such as expiration, ETags, and so forth) with respect to that
- cache. User agents may also have other caches in place that are
- also honored.</p> <!-- not http-origin privacy sensitive -->
+ <p><a href=#fetch>Fetch</a><!--FETCH--> the resource, from the <a href=#origin>origin</a> of the
+ <a href=#url>URL</a> <var title="">manifest URL</var>, with the <i>synchronous flag</i> set and
+ the <i>manual redirect flag</i> set. If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>, then use the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application cache</a> in <var title="">cache group</var> as an HTTP cache, and honor HTTP caching semantics (such as
+ expiration, ETags, and so forth) with respect to that cache. User agents may also have other
+ caches in place that are also honored.</p> <!-- not http-origin privacy sensitive -->
- <p class=note>If the resource in question is already being
- downloaded for other reasons then the existing download process
- can sometimes be used for the purposes of this step, as defined
+ <p class=note>If the resource in question is already being downloaded for other reasons then
+ the existing download process can sometimes be used for the purposes of this step, as defined
by the <a href=#fetch title=fetch>fetching</a> algorithm.</p>
- <p class=example>An example of a resource that might already
- be being downloaded is a large image on a Web page that is being
- seen for the first time. The image would get downloaded to
- satisfy the <code><a href=#the-img-element>img</a></code> element on the page, as well as
- being listed in the cache manifest. According to the rules for
- <a href=#fetch title=fetch>fetching</a> that image only need be
- downloaded once, and it can be used both for the cache and for
- the rendered Web page.</p>
+ <p class=example>An example of a resource that might already be being downloaded is a large
+ image on a Web page that is being seen for the first time. The image would get downloaded to
+ satisfy the <code><a href=#the-img-element>img</a></code> element on the page, as well as being listed in the cache
+ manifest. According to the rules for <a href=#fetch title=fetch>fetching</a> that image only need
+ be downloaded once, and it can be used both for the cache and for the rendered Web page.</p>
</li>
<li>
- <p>If the previous step fails (e.g. the server returns a 4xx or
- 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
- equivalent</a>, or there is a DNS error, or the connection
- times out, or the user cancels the download), or if the server
- returned a redirect, or if the resource is labeled with the
- "no-store" cache directive, then run the first appropriate step
- from the following list: <a href=#refsHTTP>[HTTP]</a></p>
+ <p>If the previous step fails (e.g. the server returns a 4xx or 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, or there is a DNS error, or the
+ connection times out, or the user cancels the download), or if the server returned a redirect,
+ or if the resource is labeled with the "no-store" cache directive, then run the first
+ appropriate step from the following list: <a href=#refsHTTP>[HTTP]</a></p>
- <dl class=switch><dt>If the URL being processed was flagged as an "explicit
- entry" or a "fallback entry"</dt>
+ <dl class=switch><dt>If the URL being processed was flagged as an "explicit entry" or a "fallback entry"</dt>
<dd>
- <p>If these steps are being run in parallel for any other URLs
- in <var title="">file list</var>, then abort these steps for
- those other URLs. Run the <a href=#cache-failure-steps>cache failure
+ <p>If these steps are being run in parallel for any other URLs in <var title="">file
+ list</var>, then abort these steps for those other URLs. 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
+ <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 <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a></dt>
- <dt>If the resource was labeled with the "no-store" cache
- directive</dt>
+ <dt>If the resource was labeled with the "no-store" cache directive</dt>
<dd>
@@ -71528,63 +71436,52 @@
<dd>
- <p>Copy the resource and its metadata from the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application
- cache</a> in <var title="">cache group</var> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a>
- is <i>complete</i>, and act as if that was the fetched
- resource, ignoring the resource obtained from the network.</p>
+ <p>Copy the resource and its metadata from the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application cache</a> in <var title="">cache group</var> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness
+ flag</a> is <i>complete</i>, and act as if that was the fetched resource, ignoring 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>
+ </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.</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.</p>
- <p class=note>Except for the "no-store" directive, HTTP
- caching rules that would cause a file to be expired or otherwise
- not cached are ignored for the purposes of the <a href=#application-cache-download-process>application
- cache download process</a>.</p>
+ <p class=note>Except for the "no-store" directive, HTTP caching rules that would cause a
+ file to be expired or otherwise not cached are ignored for the purposes of the
+ <a href=#application-cache-download-process>application cache download process</a>.</p>
</li>
<li>
- <p>Otherwise, the fetching succeeded. Store the resource in
- the <var title="">new cache</var>.</p>
+ <p>Otherwise, the fetching succeeded. Store the resource in the <var title="">new
+ cache</var>.</p>
- <p>If the user agent is not able to store the resource (e.g.
- because of quota restrictions), the user agent may prompt the
- user or try to resolve the problem in some other manner (e.g.
- automatically pruning content in other caches). If the problem
- cannot be resolved, the user agent must run the <a href=#cache-failure-steps>cache
- failure steps</a>.</p>
+ <p>If the user agent is not able to store the resource (e.g. because of quota restrictions),
+ the user agent may prompt the user or try to resolve the problem in some other manner (e.g.
+ automatically pruning content in other caches). If the problem cannot be resolved, the user
+ agent must run the <a href=#cache-failure-steps>cache failure steps</a>.</p>
</li>
- <li><p>If the URL being processed was flagged as an "explicit
- entry" in <var title="">file list</var>, then categorize the
- entry as an <a href=#concept-appcache-explicit title=concept-appcache-explicit>explicit
+ <li><p>If the URL being processed was flagged as an "explicit entry" in <var title="">file
+ list</var>, then categorize the entry as an <a href=#concept-appcache-explicit title=concept-appcache-explicit>explicit
entry</a>.</li>
- <li><p>If the URL being processed was flagged as a "fallback
- entry" in <var title="">file list</var>, then categorize the
- entry as a <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback
+ <li><p>If the URL being processed was flagged as a "fallback entry" in <var title="">file
+ list</var>, then categorize the entry as a <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback
entry</a>.</li>
- <li><p>If the URL being processed was flagged as an "master
- entry" in <var title="">file list</var>, then categorize the
- entry as a <a href=#concept-appcache-master title=concept-appcache-master>master
+ <li><p>If the URL being processed was flagged as an "master entry" in <var title="">file
+ list</var>, then categorize the entry as a <a href=#concept-appcache-master title=concept-appcache-master>master
entry</a>.</li>
- <li><p>As an optimization, if the resource is an HTML or XML file
- whose root element is an <code><a href=#the-html-element>html</a></code> element with a <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attribute whose value
- doesn't match the manifest URL of the application cache being
- processed, then the user agent should mark the entry as being
- <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>.</p>
+ <li><p>As an optimization, if the resource is an HTML or XML file whose root element is an
+ <code><a href=#the-html-element>html</a></code> element with a <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attribute
+ whose value doesn't match the manifest URL of the application cache being processed, then the
+ user agent should mark the entry as being <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>.</p>
</ol></li>
@@ -71595,148 +71492,127 @@
true, the <code title=dom-ProgressEvents-total>total</code> and the <code title=dom-ProgressEvents-loaded>loaded</code> attributes must be set to the number of files in
<var title="">file list</var>. The default action of these events must be, if the user agent
<a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to the
- user that all the files have been downloaded. <a href=#refsPROGRESS>[PROGRESS]</a></li>
+ user that all the files have been downloaded. <a href=#refsXHR>[XHR]</a></li>
<li><p>Store the list of <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespaces</a>,
- and the URLs of the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a> that they
- map to, in <var title="">new cache</var>.</li>
+ and the URLs of the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a> that they map
+ to, in <var title="">new cache</var>.</li>
- <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 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>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>Store the value of the new <a href=#concept-appcache-mode title=concept-appcache-mode>cache mode flag</a> in <var title="">new cache</var>.</li>
+ <li><p>Store the value of the new <a href=#concept-appcache-mode title=concept-appcache-mode>cache mode 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
- entries</a>, wait for the resource for this entry to have
- either completely downloaded or failed.</p>
+ <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 entries</a>, wait for the
+ resource for this entry to have either completely downloaded or failed.</p>
- <p>If the download failed (e.g. the server returns a 4xx or 5xx
- response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
- equivalent</a>, or there is a DNS error, the connection times
- out, or the user cancels the download), or if the resource is
- labeled with the "no-store" cache directive, then run these
- substeps:</p>
+ <p>If the download failed (e.g. the server returns a 4xx or 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, or there is a DNS error, the
+ connection times out, or the user cancels the download), or if the resource is labeled with the
+ "no-store" cache directive, then run these substeps:</p>
- <ol><li><p>Unassociate the <code><a href=#document>Document</a></code> for this entry from
- <var title="">new cache</var>.</li>
+ <ol><li><p>Unassociate the <code><a href=#document>Document</a></code> for this entry from <var title="">new
+ cache</var>.</li>
- <li><p><a href=#queue-a-post-load-task>Queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
- <code><a href=#document>Document</a></code> for this entry, if there still is one. The
- default action of this event must be, if the user agent
- <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
- user interface indicating to the user that the user agent failed
- to save the application for offline use.</p>
+ <li><p><a href=#queue-a-post-load-task>Queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple event</a> that is
+ cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
+ <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <code><a href=#document>Document</a></code> for this entry, if there
+ still is one. The default action of this event must be, if the user agent <a href=#shows-caching-progress>shows caching
+ progress</a>, the display of some sort of user interface indicating to the user that the
+ user agent failed to save the application for offline use.</p>
<li>
- <p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
- attempt</a> and this entry is the last entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
- entries</a>, then run these further substeps:</p>
+ <p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache attempt</a> and this entry is
+ the last entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master entries</a>, then run these
+ further substeps:</p>
- <ol><li><p>Discard <var title="">cache group</var> and its only
- <a href=#application-cache>application cache</a>, <var title="">new
- cache</var>.</p>
+ <ol><li><p>Discard <var title="">cache group</var> and its only <a href=#application-cache>application cache</a>,
+ <var title="">new cache</var>.</p>
- <li><p>If appropriate, remove any user interface indicating
- that an update for this cache is in progress.</li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is
+ in progress.</li>
- <li><p>Abort the <a href=#application-cache-download-process>application cache download
- process</a>.</li>
+ <li><p>Abort the <a href=#application-cache-download-process>application cache download process</a>.</li>
</ol></li>
- <li><p>Otherwise, remove this entry from <var title="">cache
- group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list
- of pending master entries</a>.</li>
+ <li><p>Otherwise, remove this entry from <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master entries</a>.</li>
- </ol><p>Otherwise, store the resource for this entry in <var title="">new cache</var>, if it isn't already there, and
- categorize its entry as a <a href=#concept-appcache-master title=concept-appcache-master>master entry</a>.</p>
+ </ol><p>Otherwise, store the resource for this entry in <var title="">new cache</var>, if it isn't
+ already there, and categorize its entry as a <a href=#concept-appcache-master title=concept-appcache-master>master
+ entry</a>.</p>
</li>
<li>
- <p><a href=#fetch>Fetch</a><!--FETCH--> the resource from <var title="">manifest URL</var> again, with the <i>synchronous
- flag</i> set, and let <var title="">second manifest</var> be that
- resource. HTTP caching semantics should again be honored for this
- request.</p> <!-- http-origin privacy sensitive, though it doesn't
- matter, since this can never be cross-origin -->
+ <p><a href=#fetch>Fetch</a><!--FETCH--> the resource from <var title="">manifest URL</var> again, with
+ the <i>synchronous flag</i> set, and let <var title="">second manifest</var> be that resource.
+ HTTP caching semantics should again be honored for this request.</p> <!-- http-origin privacy
+ sensitive, though it doesn't matter, since this can never be cross-origin -->
- <p class=note>Since caching can be honored, authors are
- encouraged to avoid setting the cache headers on the manifest in
- such a way that the user agent would simply not contact the
- network for this second request; otherwise, the user agent would
- not notice if the cache had changed during the cache update
- process.</p>
+ <p class=note>Since caching can be honored, authors are encouraged to avoid setting the cache
+ headers on the manifest in such a way that the user agent would simply not contact the network
+ for this second request; otherwise, the user agent would not notice if the cache had changed
+ during the cache update process.</p>
</li>
<li>
- <p>If the previous step failed for any reason, or if the fetching
- attempt involved a redirect, or if <var title="">second
- manifest</var> and <var title="">manifest</var> are not
- byte-for-byte identical, then schedule a rerun of the entire
- algorithm with the same parameters after a short delay, and run
- the <a href=#cache-failure-steps>cache failure steps</a>.</p>
+ <p>If the previous step failed for any reason, or if the fetching attempt involved a redirect,
+ or if <var title="">second manifest</var> and <var title="">manifest</var> are not byte-for-byte
+ identical, then schedule a rerun of the entire algorithm with the same parameters after a short
+ delay, and run the <a href=#cache-failure-steps>cache failure steps</a>.</p>
</li>
<li>
- <p>Otherwise, store <var title="">manifest</var> in <var title="">new cache</var>, if it's not there already, and
- categorize its entry as <a href=#concept-appcache-manifest title=concept-appcache-manifest>the manifest</a>.</p>
+ <p>Otherwise, store <var title="">manifest</var> in <var title="">new cache</var>, if it's not
+ there already, and categorize its entry as <a href=#concept-appcache-manifest title=concept-appcache-manifest>the
+ manifest</a>.</p>
</li>
- <li><p>Set the <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> of
- <var title="">new cache</var> to <i>complete</i>.</li>
+ <li><p>Set the <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> of <var title="">new cache</var> to <i>complete</i>.</li>
<li><p>Let <var title="">task list</var> be an empty list of <a href=#concept-task title=concept-task>tasks</a>.</p>
<li>
- <p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
- attempt</a>, then for each <a href=#cache-host>cache host</a> associated
- with an <a href=#application-cache>application cache</a> in <var title="">cache
- group</var>, create a <a href=#concept-task title=concept-task>task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-cached><a href=#event-appcache-cached>cached</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
- user interface indicating to the user that the application has
- been cached and that they can now use it offline.</p>
+ <p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache attempt</a>, then for each
+ <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in <var title="">cache
+ group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
+ that is cancelable named <code title=event-appcache-cached><a href=#event-appcache-cached>cached</a></code> at the
+ <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>, and append it to <var title="">task list</var>. The default action of these events must be, if the user agent
+ <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to
+ the user that the application has been cached and that they can now use it offline.</p>
<p>Otherwise, it is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>. For each
- <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application
- cache</a> in <var title="">cache group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> that is cancelable named <code title=event-appcache-updateready><a href=#event-appcache-updateready>updateready</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
- user interface indicating to the user that a new version is
- available and that they can activate it by reloading the page.</p>
+ <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in <var title="">cache
+ group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
+ that is cancelable named <code title=event-appcache-updateready><a href=#event-appcache-updateready>updateready</a></code> at the
+ <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>, and append it to <var title="">task list</var>. The default action of these events must be, if the user agent
+ <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to
+ the user that a new version is available and that they can activate it by reloading the
+ page.</p>
</li>
- <li><p>If appropriate, remove any user interface indicating that
- an update for this cache is in progress.</li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</li>
- <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>update
- status</a> of <var title="">cache group</var> to
- <i>idle</i>.</li>
+ <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>update status</a> of <var title="">cache
+ group</var> to <i>idle</i>.</li>
- <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load
- task">queue that task as a post-load task</a>.</li>
+ <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load task">queue that task as a post-load task</a>.</li>
</ol><p>The <dfn id=cache-failure-steps>cache failure steps</dfn> are as follows:</p>
@@ -71744,83 +71620,66 @@
<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
- entries</a>, run the following further substeps. These steps
- may be run in parallel for two or more entries at a time.</p>
+ <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 entries</a>, run the
+ following further substeps. These steps may be run in parallel for two or more entries at a
+ time.</p>
- <ol><li><p>Wait for the resource for this entry to have either
- completely downloaded or failed.</p>
+ <ol><li><p>Wait for the resource for this entry to have either completely downloaded or failed.</p>
- <li><p>Unassociate the <code><a href=#document>Document</a></code> for this entry from
- its <a href=#application-cache>application cache</a>, if it has one.</li>
+ <li><p>Unassociate the <code><a href=#document>Document</a></code> for this entry from its <a href=#application-cache>application
+ cache</a>, if it has one.</li>
- <li><p>Create a <a href=#concept-task title=concept-task>task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
- <code><a href=#document>Document</a></code> for this entry, if there still is one, and
- append it to <var title="">task list</var>. The default action of
- these events must be, if the user agent <a href=#shows-caching-progress>shows caching
- progress</a>, the display of some sort of user interface
- indicating to the user that the user agent failed to save the
- application for offline use.</p>
+ <li><p>Create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple event</a> that
+ is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
+ <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <code><a href=#document>Document</a></code> for this entry, if there
+ still is one, and append it to <var title="">task list</var>. The default action of these
+ events must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort
+ of user interface indicating to the user that the user agent failed to save the application for
+ offline use.</p>
</ol></li>
- <li><p>For each <a href=#cache-host>cache host</a> still associated with an
- <a href=#application-cache>application cache</a> in <var title="">cache group</var>,
- create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a
- simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
- user interface indicating to the user that the user agent failed to
- save the application for offline use.</li>
+ <li><p>For each <a href=#cache-host>cache host</a> still associated with an <a href=#application-cache>application cache</a>
+ in <var title="">cache group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire
+ a simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at
+ the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>, and append it to <var title="">task list</var>. The default action of these events must be, if the user agent
+ <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to the
+ user that the user agent failed to save the application for offline use.</li>
- <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
- entries</a>.</li>
+ <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master entries</a>.</li>
- <li><p>If <var title="">cache group</var> has an <a href=#application-cache>application
- cache</a> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is
- <i>incomplete</i>, then discard that <a href=#application-cache>application
- cache</a>.</p>
+ <li><p>If <var title="">cache group</var> has an <a href=#application-cache>application cache</a> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is <i>incomplete</i>, then discard
+ that <a href=#application-cache>application cache</a>.</p>
- <li><p>If appropriate, remove any user interface indicating that an
- update for this cache is in progress.</li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</li>
- <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a>
- of <var title="">cache group</var> be <i>idle</i>.</li>
+ <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache
+ group</var> be <i>idle</i>.</li>
- <li><p>If this was a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
- attempt</a>, discard <var title="">cache group</var>
- altogether.</p>
+ <li><p>If this was a <a href=#concept-appcache-cache title=concept-appcache-cache>cache attempt</a>, discard <var title="">cache group</var> altogether.</p>
- <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load
- task">queue that task as a post-load task</a>.</li>
+ <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load task">queue that task as a post-load task</a>.</li>
- <li><p>Abort the <a href=#application-cache-download-process>application cache download
- process</a>.</li>
+ <li><p>Abort the <a href=#application-cache-download-process>application cache download process</a>.</li>
- </ol><p>Attempts to <a href=#fetch>fetch</a> resources as part of the
- <a href=#application-cache-download-process>application cache download process</a> may be done with
- cache-defeating semantics, to avoid problems with stale or
+ </ol><p>Attempts to <a href=#fetch>fetch</a> resources as part of the <a href=#application-cache-download-process>application cache download
+ process</a> may be done with cache-defeating semantics, to avoid problems with stale or
inconsistent intermediary caches.</p>
- <hr><p>User agents may invoke the <a href=#application-cache-download-process>application cache download
- process</a>, in the background, for any <a href=#application-cache-group>application cache
- group</a>, at any time (with no <a href=#cache-host>cache host</a>). This
- allows user agents to keep caches primed and to update caches even
- before the user visits a site.</p>
+ <hr><p>User agents may invoke the <a href=#application-cache-download-process>application cache download process</a>, in the background,
+ for any <a href=#application-cache-group>application cache group</a>, at any time (with no <a href=#cache-host>cache host</a>). This
+ allows user agents to keep caches primed and to update caches even before the user visits a
+ site.</p>
- <hr><p>Each <code><a href=#document>Document</a></code> has a list of <dfn id=pending-application-cache-download-process-tasks>pending application
- cache download process tasks</dfn> that is used to delay events
- fired by the algorithm above until the document's <code title=event-load>load</code> event has fired. When the
- <code><a href=#document>Document</a></code> is created, the list must be empty.</p>
+ <hr><p>Each <code><a href=#document>Document</a></code> has a list of <dfn id=pending-application-cache-download-process-tasks>pending application cache download process
+ tasks</dfn> that is used to delay events fired by the algorithm above until the document's <code title=event-load>load</code> event has fired. When the <code><a href=#document>Document</a></code> is created, the
+ list must be empty.</p>
- <p>When the steps above say to <dfn id=queue-a-post-load-task>queue a post-load task</dfn>
- <var title="">task</var>, where <var title="">task</var> is a <a href=#concept-task title=concept-task>task</a> that dispatches an event on a
- target <code><a href=#applicationcache>ApplicationCache</a></code> object <var title="">target</var>, the user agent must run the appropriate steps
- from the following list:</p>
+ <p>When the steps above say to <dfn id=queue-a-post-load-task>queue a post-load task</dfn> <var title="">task</var>, where
+ <var title="">task</var> is a <a href=#concept-task title=concept-task>task</a> that dispatches an event on a
+ target <code><a href=#applicationcache>ApplicationCache</a></code> object <var title="">target</var>, the user agent must run
+ the appropriate steps from the following list:</p>
<dl><dt>If <var title="">target</var>'s <code><a href=#document>Document</a></code> is
<a href=#ready-for-post-load-tasks>ready for post-load tasks</a></dt>
@@ -71829,12 +71688,11 @@
<dt>Otherwise</dt>
- <dd><p>Add <var title="">task</var> to <var title="">target</var>'s
- <code><a href=#document>Document</a></code>'s list of <a href=#pending-application-cache-download-process-tasks>pending application cache
- download process tasks</a>.</dd>
+ <dd><p>Add <var title="">task</var> to <var title="">target</var>'s <code><a href=#document>Document</a></code>'s list
+ of <a href=#pending-application-cache-download-process-tasks>pending application cache download process tasks</a>.</dd>
- </dl><p>The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the <a href=#networking-task-source>networking task
- source</a>.</p>
+ </dl><p>The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the
+ <a href=#networking-task-source>networking task source</a>.</p>
@@ -103740,7 +103598,7 @@
<dd><cite><a href=http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions>Microformats Wiki: existing rel values</a></cite>. Microformats.</dd>
<dt id=refsMIMESNIFF>[MIMESNIFF]</dt>
- <dd><cite><a href=http://mimesniff.spec.whatwg.org/>MIME Sniffing</a></cite>, A. Barth, I. Hickson. WHATWG.</dd>
+ <dd><cite><a href=http://mimesniff.spec.whatwg.org/>MIME Sniffing</a></cite>, G. Hemsley. WHATWG.</dd>
<dt id=refsMNG>[MNG]</dt>
<dd><cite><a href=http://www.libpng.org/pub/mng/spec/>MNG (Multiple-image Network Graphics) Format</a></cite>. G. Randers-Pehrson.</dd>
@@ -103801,9 +103659,6 @@
<dt id=refsPPUTF8>[PPUTF8]</dt>
<dd>(Non-normative) <cite><a href=http://www.sw.it.aoyama.ac.jp/2012/pub/IUC11-UTF-8.pdf>The Properties and Promises <!-- Promizes (sic) --> of UTF-8</a></cite>, M. Dürst. University of Zürich. In <cite>Proceedings of the 11th International Unicode Conference</cite>.</dd>
- <dt id=refsPROGRESS>[PROGRESS]</dt>
- <dd><cite><a href=http://dev.w3.org/2006/webapi/progress/>Progress Events</a></cite>, A. van Kesteren. W3C.</dd>
-
<dt id=refsPSL>[PSL]</dt>
<dd><cite><a href=http://publicsuffix.org/>Public Suffix List</a></cite>.
Mozilla Foundation.</dd>
Modified: index
===================================================================
--- index 2012-12-04 23:55:58 UTC (rev 7562)
+++ index 2012-12-05 00:19:19 UTC (rev 7563)
@@ -248,7 +248,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
- <h2 class="no-num no-toc">Living Standard — Last Updated 4 December 2012</h2>
+ <h2 class="no-num no-toc">Living Standard — Last Updated 5 December 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
@@ -71066,379 +71066,303 @@
<h4 id=downloading-or-updating-an-application-cache><span class=secno>6.7.4 </span>Downloading or updating an application cache</h4>
- <p>When the user agent is required (by other parts of this
- specification) to start the <dfn id=application-cache-download-process>application cache download
- process</dfn> for an <a href=#absolute-url>absolute URL</a> purported to identify
- a <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>, or for an
- <a href=#application-cache-group>application cache group</a>, potentially given a particular
- <a href=#cache-host>cache host</a>, and potentially given a <a href=#concept-appcache-master title=concept-appcache-master>master</a> resource, the user
- agent must run the steps below. These steps are always run
- asynchronously, in parallel with the <a href=#event-loop>event loop</a> <a href=#concept-task title=concept-task>tasks</a>.</p>
+ <p>When the user agent is required (by other parts of this specification) to start the
+ <dfn id=application-cache-download-process>application cache download process</dfn> for an <a href=#absolute-url>absolute URL</a> purported to
+ identify a <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>, or for an <a href=#application-cache-group>application
+ cache group</a>, potentially given a particular <a href=#cache-host>cache host</a>, and potentially given
+ a <a href=#concept-appcache-master title=concept-appcache-master>master</a> resource, the user agent must run the steps
+ below. These steps are always run asynchronously, in parallel with the <a href=#event-loop>event loop</a>
+ <a href=#concept-task title=concept-task>tasks</a>.</p>
- <p>Some of these steps have requirements that only apply if the user
- agent <dfn id=shows-caching-progress>shows caching progress</dfn>. Support for this is
- optional. Caching progress UI could consist of a progress bar or
- message panel in the user agent's interface, or an overlay, or
- something else. Certain events fired during the <a href=#application-cache-download-process>application
- cache download process</a> allow the script to override the display
- of such an interface. The goal of this is to allow Web applications
- to provide more seamless update mechanisms, hiding from the user the
- mechanics of the application cache mechanism. User agents may
- display user interfaces independent of this, but are encouraged to
- not show prominent update progress notifications for applications
- that cancel the relevant events.</p>
+ <p>Some of these steps have requirements that only apply if the user agent <dfn id=shows-caching-progress>shows caching
+ progress</dfn>. Support for this is optional. Caching progress UI could consist of a progress bar
+ or message panel in the user agent's interface, or an overlay, or something else. Certain events
+ fired during the <a href=#application-cache-download-process>application cache download process</a> allow the script to override the
+ display of such an interface. The goal of this is to allow Web applications to provide more
+ seamless update mechanisms, hiding from the user the mechanics of the application cache mechanism.
+ User agents may display user interfaces independent of this, but are encouraged to not show
+ prominent update progress notifications for applications that cancel the relevant events.</p>
<p class=note>These events are delayed until after the <code title=event-load>load</code> event has fired.</p>
- <p>The <a href=#application-cache-download-process>application cache download process</a> steps are as
- follows:
+ <p>The <a href=#application-cache-download-process>application cache download process</a> steps are as follows:
- <ol><li><p>Optionally, wait until the permission to start the
- <a href=#application-cache-download-process>application cache download process</a> has been obtained
- from the user and until the user agent is confident that the
- network is available. This could include doing nothing until the
- user explicitly opts-in to caching the site, or could involve
- prompting the user for permission. The algorithm might never get
- past this point. (This step is particularly intended to be used by
- user agents running on severely space-constrained devices or in
- highly privacy-sensitive environments).</li>
+ <ol><li><p>Optionally, wait until the permission to start the <a href=#application-cache-download-process>application cache download
+ process</a> has been obtained from the user and until the user agent is confident that the
+ network is available. This could include doing nothing until the user explicitly opts-in to
+ caching the site, or could involve prompting the user for permission. The algorithm might never
+ get past this point. (This step is particularly intended to be used by user agents running on
+ severely space-constrained devices or in highly privacy-sensitive environments).</li>
<li>
- <p>Atomically, so as to avoid race conditions, perform the
- following substeps:</p>
+ <p>Atomically, so as to avoid race conditions, perform the following substeps:</p>
<ol><li>
<p>Pick the appropriate substeps:</p>
- <dl class=switch><dt>If these steps were invoked with an <a href=#absolute-url>absolute
- URL</a> purported to identify a <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a></dt>
+ <dl class=switch><dt>If these steps were invoked with an <a href=#absolute-url>absolute URL</a> purported to identify a
+ <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a></dt>
<dd>
- <p>Let <var title="">manifest URL</var> be that <a href=#absolute-url>absolute
- URL</a>.</p>
+ <p>Let <var title="">manifest URL</var> be that <a href=#absolute-url>absolute URL</a>.</p>
- <p>If there is no <a href=#application-cache-group>application cache group</a>
- identified by <var title="">manifest URL</var>, then create a
- new <a href=#application-cache-group>application cache group</a> identified by <var title="">manifest URL</var>. Initially, it has no <a href=#application-cache title="application cache">application caches</a>. One will
- be created later in this algorithm.</p>
+ <p>If there is no <a href=#application-cache-group>application cache group</a> identified by <var title="">manifest
+ URL</var>, then create a new <a href=#application-cache-group>application cache group</a> identified by <var title="">manifest URL</var>. Initially, it has no <a href=#application-cache title="application
+ cache">application caches</a>. One will be created later in this algorithm.</p>
</dd>
- <dt>If these steps were invoked with an <a href=#application-cache-group>application cache
- group</a></dt>
+ <dt>If these steps were invoked with an <a href=#application-cache-group>application cache group</a></dt>
<dd>
- <p>Let <var title="">manifest URL</var> be the <a href=#absolute-url>absolute
- URL</a> of the <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> used to
- identify the <a href=#application-cache-group>application cache group</a> to be
- updated.</p>
+ <p>Let <var title="">manifest URL</var> be the <a href=#absolute-url>absolute URL</a> of the <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> used to identify the <a href=#application-cache-group>application
+ cache group</a> to be updated.</p>
- <p>If that <a href=#application-cache-group>application cache group</a> is <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>, then abort
- this instance of the <a href=#application-cache-download-process>application cache download
- process</a>. This can happen if another instance of this
- algorithm found the manifest to be 404 or 410 while this
- algorithm was waiting in the first step above.</p>
+ <p>If that <a href=#application-cache-group>application cache group</a> is <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>, then abort this instance of the
+ <a href=#application-cache-download-process>application cache download process</a>. This can happen if another instance of this
+ algorithm found the manifest to be 404 or 410 while this algorithm was waiting in the first
+ step above.</p>
</dd>
</dl></li>
- <li><p>Let <var title="">cache group</var> be the
- <a href=#application-cache-group>application cache group</a> identified by <var title="">manifest URL</var>.</li>
+ <li><p>Let <var title="">cache group</var> be the <a href=#application-cache-group>application cache group</a>
+ identified by <var title="">manifest URL</var>.</li>
- <li><p>If these steps were invoked with a <a href=#concept-appcache-master title=concept-appcache-master>master</a> resource, then add
- the resource, along with the resource's <code><a href=#document>Document</a></code>, to
- <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
- entries</a>.</li>
+ <li><p>If these steps were invoked with a <a href=#concept-appcache-master title=concept-appcache-master>master</a>
+ resource, then add the resource, along with the resource's <code><a href=#document>Document</a></code>, to <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending
+ master entries</a>.</li>
- <li><p>If these steps were invoked with a <a href=#cache-host>cache
- host</a>, and the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> is <i>checking</i> or
- <i>downloading</i>, then <a href=#queue-a-post-load-task>queue a post-load task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> that is
- cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that
- <a href=#cache-host>cache host</a>. The default action of this event must
- be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
- display of some sort of user interface indicating to the user
- that the user agent is checking to see if it can download the
- application.</li>
+ <li><p>If these steps were invoked with a <a href=#cache-host>cache host</a>, and the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> is
+ <i>checking</i> or <i>downloading</i>, then <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a
+ simple event</a> named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> that is
+ cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that <a href=#cache-host>cache host</a>. The
+ default action of this event must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>,
+ the display of some sort of user interface indicating to the user that the user agent is
+ checking to see if it can download the application.</li>
- <li><p>If these steps were invoked with a <a href=#cache-host>cache
- host</a>, and the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> is <i>downloading</i>, then also
- <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
+ <li><p>If these steps were invoked with a <a href=#cache-host>cache host</a>, and the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> is
+ <i>downloading</i>, then also <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
event</a> named <code title=event-appcache-downloading><a href=#event-appcache-downloading>downloading</a></code> that is
- cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that
- <a href=#cache-host>cache host</a>. The default action of this event must
- be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
- display of some sort of user interface indicating to the user the
- application is being downloaded.</li>
+ cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that <a href=#cache-host>cache host</a>. The
+ default action of this event must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>,
+ the display of some sort of user interface indicating to the user the application is being
+ downloaded.</li>
- <li><p>If the <a href=#concept-appcache-status title=concept-appcache-status>status</a>
- of the <var title="">cache group</var> is either <i>checking</i>
- or <i>downloading</i>, then abort this instance of the
- <a href=#application-cache-download-process>application cache download process</a>, as an update is
- already in progress.</li>
+ <li><p>If the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of the <var title="">cache
+ group</var> is either <i>checking</i> or <i>downloading</i>, then abort this instance of the
+ <a href=#application-cache-download-process>application cache download process</a>, as an update is already in progress.</li>
- <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> to <i>checking</i>.</p>
+ <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache
+ group</var> to <i>checking</i>.</p>
- <li><p>For each <a href=#cache-host>cache host</a> associated with an
- <a href=#application-cache>application cache</a> in <var title="">cache
- group</var>, <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a
- simple event</a> that is cancelable named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>. The default action of these events must be, if the
- user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
- some sort of user interface indicating to the user that the user
- agent is checking for the availability of updates.</li>
+ <li><p>For each <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in
+ <var title="">cache group</var>, <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
+ event</a> that is cancelable named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> at
+ the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>. The default action
+ of these events must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
+ some sort of user interface indicating to the user that the user agent is checking for the
+ availability of updates.</li>
</ol><p class=note>The remainder of the steps run asynchronously.</p>
- <p>If <var title="">cache group</var> already has an
- <a href=#application-cache>application cache</a> in it, then this is an <dfn id=concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</dfn>. Otherwise,
- this is a <dfn id=concept-appcache-cache title=concept-appcache-cache>cache
- attempt</dfn>.</p>
+ <p>If <var title="">cache group</var> already has an <a href=#application-cache>application cache</a> in it, then
+ this is an <dfn id=concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</dfn>. Otherwise, this is a
+ <dfn id=concept-appcache-cache title=concept-appcache-cache>cache attempt</dfn>.</p>
</li>
- <li><p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
- attempt</a>, then this algorithm was invoked with a <a href=#cache-host>cache
- host</a>; <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a
- simple event</a> named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> that is cancelable
- at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that <a href=#cache-host>cache
- host</a>. The default action of this event must be, if the user
- agent <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort
- of user interface indicating to the user that the user agent is
- checking for the availability of updates.</li>
+ <li><p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache attempt</a>, then this
+ algorithm was invoked with a <a href=#cache-host>cache host</a>; <a href=#queue-a-post-load-task>queue a post-load task</a> to
+ <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-appcache-checking><a href=#event-appcache-checking>checking</a></code> that
+ is cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of that <a href=#cache-host>cache host</a>. The
+ default action of this event must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
+ display of some sort of user interface indicating to the user that the user agent is checking for
+ the availability of updates.</li>
<li>
- <p><i>Fetching the manifest</i>: <a href=#fetch>Fetch</a><!--FETCH-->
- the resource from <var title="">manifest URL</var> with the
- <i>synchronous flag</i> set, and let <var title="">manifest</var>
- be that resource. HTTP caching semantics should be honored for
- this request.</p> <!-- http-origin privacy sensitive, though it
- doesn't matter, since this can never be cross-origin -->
+ <p><i>Fetching the manifest</i>: <a href=#fetch>Fetch</a><!--FETCH--> the resource from <var title="">manifest URL</var> with the <i>synchronous flag</i> set, and let <var title="">manifest</var> be that resource. HTTP caching semantics should be honored for this
+ request.</p> <!-- http-origin privacy sensitive, though it doesn't matter, since this can never
+ be cross-origin -->
- <p>Parse <var title="">manifest</var> according to the <a href=#parse-a-manifest title="parse a manifest">rules for parsing manifests</a>,
- obtaining a list of <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, entries for the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a>,
- and values for the <a href=#concept-appcache-onlinewhitelist-wildcard title=concept-appcache-onlinewhitelist-wildcard>online whitelist
- wildcard flag</a> and the <a href=#concept-appcache-mode title=concept-appcache-mode>cache mode flag</a>.</p>
+ <p>Parse <var title="">manifest</var> according to the <a href=#parse-a-manifest title="parse a manifest">rules for
+ parsing manifests</a>, obtaining a list of <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, entries for
+ the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a>, and values for the
+ <a href=#concept-appcache-onlinewhitelist-wildcard title=concept-appcache-onlinewhitelist-wildcard>online whitelist wildcard flag</a>
+ and the <a href=#concept-appcache-mode title=concept-appcache-mode>cache mode flag</a>.</p>
- <p class=note>The <a href=#mime-type>MIME type</a> of the resource is
- ignored — it is assumed to be
- <code><a href=#text/cache-manifest>text/cache-manifest</a></code>. In the future, if new manifest
- formats are supported, the different types will probably be
- distinguished on the basis of the file signatures (for the current
- format, that is the "<code title="">CACHE MANIFEST</code>"
- string at the top of the file).</p>
+ <p class=note>The <a href=#mime-type>MIME type</a> of the resource is ignored — it is assumed to
+ be <code><a href=#text/cache-manifest>text/cache-manifest</a></code>. In the future, if new manifest formats are supported, the
+ different types will probably be distinguished on the basis of the file signatures (for the
+ current format, that is the "<code title="">CACHE MANIFEST</code>" string at the top of the
+ file).</p>
</li>
<li>
- <p>If <i>fetching the manifest</i> fails due to a 404 or 410
- response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
- equivalent</a>, then run these substeps:</p>
+ <p>If <i>fetching the manifest</i> fails due to a 404 or 410 response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, then run these substeps:</p>
- <ol><li><p>Mark <var title="">cache group</var> as <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>. This <var title="">cache group</var> no longer exists for any purpose other
- than the processing of <code><a href=#document>Document</a></code> objects already
- associated with an <a href=#application-cache>application cache</a> in the <var title="">cache group</var>.</li>
+ <ol><li><p>Mark <var title="">cache group</var> as <a href=#concept-appcache-obsolete title=concept-appcache-obsolete>obsolete</a>. This <var title="">cache group</var> no
+ longer exists for any purpose other than the processing of <code><a href=#document>Document</a></code> objects
+ already associated with an <a href=#application-cache>application cache</a> in the <var title="">cache
+ group</var>.</li>
- <li><p>Let <var title="">task list</var> be an empty list of
- <a href=#concept-task title=concept-task>tasks</a>.</p>
+ <li><p>Let <var title="">task list</var> be an empty list of <a href=#concept-task title=concept-task>tasks</a>.</p>
- <li><p>For each <a href=#cache-host>cache host</a> associated with an
- <a href=#application-cache>application cache</a> in <var title="">cache
- group</var>, create a <a href=#concept-task title=concept-task>task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code> that is
- cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
- <a href=#cache-host>cache host</a>, and append it to <var title="">task
- list</var>. The default action of these events must be, if the
- user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
- some sort of user interface indicating to the user that the
- application is no longer available for offline use.</li>
+ <li><p>For each <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in
+ <var title="">cache group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire
+ a simple event</a> named <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code> that is
+ cancelable at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>, and
+ append it to <var title="">task list</var>. The default action of these events must be, if the
+ user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface
+ indicating to the user that the application is no longer available for offline use.</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
- entries</a>, create a <a href=#concept-task title=concept-task>task</a>
- to <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named
- <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> (not <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code>!) at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
- <code><a href=#document>Document</a></code> for this entry, if there still is one, and
- append it to <var title="">task list</var>. The default action of
- this event must be, if the user agent <a href=#shows-caching-progress>shows caching
- progress</a>, the display of some sort of user interface
- indicating to the user that the user agent failed to save the
- application for offline use.</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 entries</a>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named
+ <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> (not <code title=event-appcache-obsolete><a href=#event-appcache-obsolete>obsolete</a></code>!) at the <code><a href=#applicationcache>ApplicationCache</a></code>
+ singleton of the <code><a href=#document>Document</a></code> for this entry, if there still is one, and append it to
+ <var title="">task list</var>. The default action of this event must be, if the user agent
+ <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to
+ the user that the user agent failed to save the application for offline use.</li>
- <li><p>If <var title="">cache group</var> has an
- <a href=#application-cache>application cache</a> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is
- <i>incomplete</i>, then discard that <a href=#application-cache>application
- cache</a>.</p>
+ <li><p>If <var title="">cache group</var> has an <a href=#application-cache>application cache</a> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is <i>incomplete</i>, then
+ discard that <a href=#application-cache>application cache</a>.</p>
- <li><p>If appropriate, remove any user interface indicating that
- an update for this cache is in progress.</li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</li>
- <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> be <i>idle</i>.</li>
+ <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache
+ group</var> be <i>idle</i>.</li>
- <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load
- task">queue that task as a post-load task</a>.</li>
+ <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load task">queue that task as a post-load task</a>.</li>
- <li><p>Abort the <a href=#application-cache-download-process>application cache download
- process</a>.</li>
+ <li><p>Abort the <a href=#application-cache-download-process>application cache download process</a>.</li>
</ol></li>
<li>
- <p>Otherwise, if <i>fetching the manifest</i> fails in some other
- way (e.g. the server returns another 4xx or 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, or
- there is a DNS error, or the connection times out, or the user
- cancels the download, or the parser for manifests fails when
- checking the magic signature), or if the server returned a
+ <p>Otherwise, if <i>fetching the manifest</i> fails in some other way (e.g. the server returns
+ another 4xx or 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, or
+ there is a DNS error, or the connection times out, or the user cancels the download, or the
+ parser for manifests fails when checking the magic signature), or if the server returned a
redirect, then run the <a href=#cache-failure-steps>cache failure steps</a>. <a href=#refsHTTP>[HTTP]</a></p>
</li>
<li>
- <p>If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade
- attempt</a> and the newly downloaded <var title="">manifest</var> is byte-for-byte identical to the manifest
- found in the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a>
- <a href=#application-cache>application cache</a> in <var title="">cache group</var>,
- or the server reported it as "304 Not Modified" <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, then
- run these substeps:</p>
+ <p>If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a> and the newly
+ downloaded <var title="">manifest</var> is byte-for-byte identical to the manifest found in the
+ <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application cache</a> in <var title="">cache group</var>, or the server reported it as "304 Not Modified" <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, then run these substeps:</p>
- <ol><li><p>Let <var title="">cache</var> be the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application
- cache</a> in <var title="">cache group</var>.</li>
+ <ol><li><p>Let <var title="">cache</var> be the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a>
+ <a href=#application-cache>application cache</a> in <var title="">cache group</var>.</li>
- <li><p>Let <var title="">task list</var> be an empty list of
- <a href=#concept-task title=concept-task>tasks</a>.</p>
+ <li><p>Let <var title="">task list</var> be an empty list of <a href=#concept-task title=concept-task>tasks</a>.</p>
<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
- entries</a>, wait for the resource for this entry to have
- either completely downloaded or failed.</p>
+ <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 entries</a>, wait for the
+ resource for this entry to have either completely downloaded or failed.</p>
- <p>If the download failed (e.g. the server returns a 4xx or 5xx
- response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
- equivalent</a>, or there is a DNS error, the connection times
- out, or the user cancels the download), or if the resource is
- labeled with the "no-store" cache directive, then create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
- <code><a href=#document>Document</a></code> for this entry, if there still is one, and
- append it to <var title="">task list</var>. The default action
- of this event must be, if the user agent <a href=#shows-caching-progress>shows caching
- progress</a>, the display of some sort of user interface
- indicating to the user that the user agent failed to save the
- application for offline use.</p>
+ <p>If the download failed (e.g. the server returns a 4xx or 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, or there is a DNS error, the
+ connection times out, or the user cancels the download), or if the resource is labeled with
+ the "no-store" cache directive, then create a <a href=#concept-task title=concept-task>task</a> to
+ <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of
+ the <code><a href=#document>Document</a></code> for this entry, if there still is one, and append it to <var title="">task list</var>. The default action of this event must be, if the user agent
+ <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to
+ the user that the user agent failed to save the application for offline use.</p>
- <p>Otherwise, associate the <code><a href=#document>Document</a></code> for this entry
- with <var title="">cache</var>; store the resource for this
- entry in <var title="">cache</var>, if it isn't already there,
- and categorize its entry as a <a href=#concept-appcache-master title=concept-appcache-master>master entry</a>. If the
- resource's <a href=#url>URL</a> has a <a href=#url-fragment title=url-fragment><fragment></a> component, it must
- be removed from the entry in <var title="">cache</var>
- (application caches never include fragment identifiers).</p>
+ <p>Otherwise, associate the <code><a href=#document>Document</a></code> for this entry with <var title="">cache</var>; store the resource for this entry in <var title="">cache</var>, if it
+ isn't already there, and categorize its entry as a <a href=#concept-appcache-master title=concept-appcache-master>master entry</a>. If the resource's <a href=#url>URL</a> has a
+ <a href=#url-fragment title=url-fragment><fragment></a> component, it must be removed from the
+ entry in <var title="">cache</var> (application caches never include fragment
+ identifiers).</p>
</li>
- <li><p>For each <a href=#cache-host>cache host</a> associated with an
- <a href=#application-cache>application cache</a> in <var title="">cache
- group</var>, create a <a href=#concept-task title=concept-task>task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-noupdate><a href=#event-appcache-noupdate>noupdate</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
- user interface indicating to the user that the application is up
- to date.</li>
+ <li><p>For each <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in
+ <var title="">cache group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire
+ a simple event</a> that is cancelable named <code title=event-appcache-noupdate><a href=#event-appcache-noupdate>noupdate</a></code> at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton
+ of the <a href=#cache-host>cache host</a>, and append it to <var title="">task list</var>. The default
+ action of these events must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
+ display of some sort of user interface indicating to the user that the application is up to
+ date.</li>
- <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
- entries</a>.</li>
+ <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master entries</a>.</li>
- <li><p>If appropriate, remove any user interface indicating that
- an update for this cache is in progress.</li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</li>
- <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache group</var> be <i>idle</i>.</li>
+ <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache
+ group</var> be <i>idle</i>.</li>
- <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load
- task">queue that task as a post-load task</a>.</li>
+ <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load task">queue that task as a post-load task</a>.</li>
- <li><p>Abort the <a href=#application-cache-download-process>application cache download
- process</a>.</li>
+ <li><p>Abort the <a href=#application-cache-download-process>application cache download process</a>.</li>
</ol></li>
- <li><p>Let <var title="">new cache</var> be a newly created
- <a href=#application-cache>application cache</a> in <var title="">cache
- group</var>. Set its <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> to
- <i>incomplete</i>.</li>
+ <li><p>Let <var title="">new cache</var> be a newly created <a href=#application-cache>application cache</a> in
+ <var title="">cache group</var>. Set its <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness
+ flag</a> to <i>incomplete</i>.</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
- entries</a>, associate the <code><a href=#document>Document</a></code> for this entry
- with <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 entries</a>, associate the
+ <code><a href=#document>Document</a></code> for this entry with <var title="">new cache</var>.</li>
- <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a>
- of <var title="">cache group</var> to <i>downloading</i>.</li>
+ <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache
+ group</var> to <i>downloading</i>.</li>
- <li><p>For each <a href=#cache-host>cache host</a> associated with an
- <a href=#application-cache>application cache</a> in <var title="">cache group</var>,
- <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> that is cancelable named <code title=event-appcache-downloading><a href=#event-appcache-downloading>downloading</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>. The default action of these events must be, if the
- user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of some
- sort of user interface indicating to the user that a new version is
- being downloaded.</li>
+ <li><p>For each <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in <var title="">cache group</var>, <a href=#queue-a-post-load-task>queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
+ event</a> that is cancelable named <code title=event-appcache-downloading><a href=#event-appcache-downloading>downloading</a></code>
+ at the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>. The default action
+ of these events must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of
+ some sort of user interface indicating to the user that a new version is being
+ downloaded.</li>
- <li><p>Let <var title="">file list</var> be an empty list of
- URLs with flags.</li>
+ <li><p>Let <var title="">file list</var> be an empty list of URLs with flags.</li>
- <li><p>Add all the URLs in the list of <a href=#concept-appcache-explicit title=concept-appcache-explicit>explicit entries</a> obtained
- by parsing <var title="">manifest</var> to <var title="">file
- list</var>, each flagged with "explicit entry".</li>
+ <li><p>Add all the URLs in the list of <a href=#concept-appcache-explicit title=concept-appcache-explicit>explicit
+ entries</a> obtained by parsing <var title="">manifest</var> to <var title="">file list</var>,
+ each flagged with "explicit entry".</li>
- <li><p>Add all the URLs in the list of <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a> obtained
- by parsing <var title="">manifest</var> to <var title="">file
- list</var>, each flagged with "fallback entry".</li>
+ <li><p>Add all the URLs in the list of <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback
+ entries</a> obtained by parsing <var title="">manifest</var> to <var title="">file list</var>,
+ each flagged with "fallback entry".</li>
- <li><p>If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade
- attempt</a>, then add all the URLs of <a href=#concept-appcache-master title=concept-appcache-master>master entries</a> in the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application
- cache</a> in <var title="">cache group</var> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is
- <i>complete</i> to <var title="">file list</var>, each flagged with
- "master entry".</li>
+ <li><p>If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>, then add all
+ the URLs of <a href=#concept-appcache-master title=concept-appcache-master>master entries</a> in the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application cache</a> in <var title="">cache group</var> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness
+ flag</a> is <i>complete</i> to <var title="">file list</var>, each flagged with "master
+ entry".</li>
- <li><p>If any URL is in <var title="">file list</var> more than
- once, then merge the entries into one entry for that URL, that
- entry having all the flags that the original entries had.</li>
+ <li><p>If any URL is in <var title="">file list</var> more than once, then merge the entries into
+ one entry for that URL, that entry having all the flags that the original entries had.</li>
<li>
- <p>For each URL in <var title="">file list</var>, run the
- following steps. These steps may be run in parallel for two or
- more of the URLs at a time. If, while running these steps, the
- <code><a href=#applicationcache>ApplicationCache</a></code> object's <code title=dom-appcache-abort><a href=#dom-appcache-abort>abort()</a></code> method <a href=#send-a-signal title="send
- a signal">sends a signal</a> to this instance of the
- <a href=#application-cache-download-process>application cache download process</a> algorithm, then
- run the <a href=#cache-failure-steps>cache failure steps</a> instead.</p>
+ <p>For each URL in <var title="">file list</var>, run the following steps. These steps may be
+ run in parallel for two or more of the URLs at a time. If, while running these steps, the
+ <code><a href=#applicationcache>ApplicationCache</a></code> object's <code title=dom-appcache-abort><a href=#dom-appcache-abort>abort()</a></code> method
+ <a href=#send-a-signal title="send a signal">sends a signal</a> to this instance of the <a href=#application-cache-download-process>application
+ cache download process</a> algorithm, then run the <a href=#cache-failure-steps>cache failure steps</a>
+ instead.</p>
<ol><li>
- <p>If the resource URL being processed was flagged as neither an
- "explicit entry" nor or a "fallback entry", then the user agent
- may skip this URL.</p>
+ <p>If the resource URL being processed was flagged as neither an "explicit entry" nor or a
+ "fallback entry", then the user agent may skip this URL.</p>
- <p class=note>This is intended to allow user agents to expire
- resources not listed in the manifest from the cache. Generally,
- implementors are urged to use an approach that expires
+ <p class=note>This is intended to allow user agents to expire resources not listed in the
+ manifest from the cache. Generally, implementors are urged to use an approach that expires
lesser-used resources first.</p>
</li>
@@ -71453,70 +71377,54 @@
<var title="">file list</var> that have been either downloaded or skipped so far. The default
action of these events must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the
display of some sort of user interface indicating to the user that a file is being downloaded
- in preparation for updating the application. <a href=#refsPROGRESS>[PROGRESS]</a></li>
+ in preparation for updating the application. <a href=#refsXHR>[XHR]</a></li>
<li>
- <p><a href=#fetch>Fetch</a><!--FETCH--> the resource, from the
- <a href=#origin>origin</a> of the <a href=#url>URL</a> <var title="">manifest URL</var>, with the <i>synchronous flag</i>
- set and the <i>manual redirect flag</i> set. If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>, then
- use the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a>
- <a href=#application-cache>application cache</a> in <var title="">cache
- group</var> as an HTTP cache, and honor HTTP caching semantics
- (such as expiration, ETags, and so forth) with respect to that
- cache. User agents may also have other caches in place that are
- also honored.</p> <!-- not http-origin privacy sensitive -->
+ <p><a href=#fetch>Fetch</a><!--FETCH--> the resource, from the <a href=#origin>origin</a> of the
+ <a href=#url>URL</a> <var title="">manifest URL</var>, with the <i>synchronous flag</i> set and
+ the <i>manual redirect flag</i> set. If this is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>, then use the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application cache</a> in <var title="">cache group</var> as an HTTP cache, and honor HTTP caching semantics (such as
+ expiration, ETags, and so forth) with respect to that cache. User agents may also have other
+ caches in place that are also honored.</p> <!-- not http-origin privacy sensitive -->
- <p class=note>If the resource in question is already being
- downloaded for other reasons then the existing download process
- can sometimes be used for the purposes of this step, as defined
+ <p class=note>If the resource in question is already being downloaded for other reasons then
+ the existing download process can sometimes be used for the purposes of this step, as defined
by the <a href=#fetch title=fetch>fetching</a> algorithm.</p>
- <p class=example>An example of a resource that might already
- be being downloaded is a large image on a Web page that is being
- seen for the first time. The image would get downloaded to
- satisfy the <code><a href=#the-img-element>img</a></code> element on the page, as well as
- being listed in the cache manifest. According to the rules for
- <a href=#fetch title=fetch>fetching</a> that image only need be
- downloaded once, and it can be used both for the cache and for
- the rendered Web page.</p>
+ <p class=example>An example of a resource that might already be being downloaded is a large
+ image on a Web page that is being seen for the first time. The image would get downloaded to
+ satisfy the <code><a href=#the-img-element>img</a></code> element on the page, as well as being listed in the cache
+ manifest. According to the rules for <a href=#fetch title=fetch>fetching</a> that image only need
+ be downloaded once, and it can be used both for the cache and for the rendered Web page.</p>
</li>
<li>
- <p>If the previous step fails (e.g. the server returns a 4xx or
- 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
- equivalent</a>, or there is a DNS error, or the connection
- times out, or the user cancels the download), or if the server
- returned a redirect, or if the resource is labeled with the
- "no-store" cache directive, then run the first appropriate step
- from the following list: <a href=#refsHTTP>[HTTP]</a></p>
+ <p>If the previous step fails (e.g. the server returns a 4xx or 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, or there is a DNS error, or the
+ connection times out, or the user cancels the download), or if the server returned a redirect,
+ or if the resource is labeled with the "no-store" cache directive, then run the first
+ appropriate step from the following list: <a href=#refsHTTP>[HTTP]</a></p>
- <dl class=switch><dt>If the URL being processed was flagged as an "explicit
- entry" or a "fallback entry"</dt>
+ <dl class=switch><dt>If the URL being processed was flagged as an "explicit entry" or a "fallback entry"</dt>
<dd>
- <p>If these steps are being run in parallel for any other URLs
- in <var title="">file list</var>, then abort these steps for
- those other URLs. Run the <a href=#cache-failure-steps>cache failure
+ <p>If these steps are being run in parallel for any other URLs in <var title="">file
+ list</var>, then abort these steps for those other URLs. 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
+ <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 <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a></dt>
- <dt>If the resource was labeled with the "no-store" cache
- directive</dt>
+ <dt>If the resource was labeled with the "no-store" cache directive</dt>
<dd>
@@ -71528,63 +71436,52 @@
<dd>
- <p>Copy the resource and its metadata from the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application
- cache</a> in <var title="">cache group</var> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a>
- is <i>complete</i>, and act as if that was the fetched
- resource, ignoring the resource obtained from the network.</p>
+ <p>Copy the resource and its metadata from the <a href=#concept-appcache-newer title=concept-appcache-newer>newest</a> <a href=#application-cache>application cache</a> in <var title="">cache group</var> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness
+ flag</a> is <i>complete</i>, and act as if that was the fetched resource, ignoring 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>
+ </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.</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.</p>
- <p class=note>Except for the "no-store" directive, HTTP
- caching rules that would cause a file to be expired or otherwise
- not cached are ignored for the purposes of the <a href=#application-cache-download-process>application
- cache download process</a>.</p>
+ <p class=note>Except for the "no-store" directive, HTTP caching rules that would cause a
+ file to be expired or otherwise not cached are ignored for the purposes of the
+ <a href=#application-cache-download-process>application cache download process</a>.</p>
</li>
<li>
- <p>Otherwise, the fetching succeeded. Store the resource in
- the <var title="">new cache</var>.</p>
+ <p>Otherwise, the fetching succeeded. Store the resource in the <var title="">new
+ cache</var>.</p>
- <p>If the user agent is not able to store the resource (e.g.
- because of quota restrictions), the user agent may prompt the
- user or try to resolve the problem in some other manner (e.g.
- automatically pruning content in other caches). If the problem
- cannot be resolved, the user agent must run the <a href=#cache-failure-steps>cache
- failure steps</a>.</p>
+ <p>If the user agent is not able to store the resource (e.g. because of quota restrictions),
+ the user agent may prompt the user or try to resolve the problem in some other manner (e.g.
+ automatically pruning content in other caches). If the problem cannot be resolved, the user
+ agent must run the <a href=#cache-failure-steps>cache failure steps</a>.</p>
</li>
- <li><p>If the URL being processed was flagged as an "explicit
- entry" in <var title="">file list</var>, then categorize the
- entry as an <a href=#concept-appcache-explicit title=concept-appcache-explicit>explicit
+ <li><p>If the URL being processed was flagged as an "explicit entry" in <var title="">file
+ list</var>, then categorize the entry as an <a href=#concept-appcache-explicit title=concept-appcache-explicit>explicit
entry</a>.</li>
- <li><p>If the URL being processed was flagged as a "fallback
- entry" in <var title="">file list</var>, then categorize the
- entry as a <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback
+ <li><p>If the URL being processed was flagged as a "fallback entry" in <var title="">file
+ list</var>, then categorize the entry as a <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback
entry</a>.</li>
- <li><p>If the URL being processed was flagged as an "master
- entry" in <var title="">file list</var>, then categorize the
- entry as a <a href=#concept-appcache-master title=concept-appcache-master>master
+ <li><p>If the URL being processed was flagged as an "master entry" in <var title="">file
+ list</var>, then categorize the entry as a <a href=#concept-appcache-master title=concept-appcache-master>master
entry</a>.</li>
- <li><p>As an optimization, if the resource is an HTML or XML file
- whose root element is an <code><a href=#the-html-element>html</a></code> element with a <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attribute whose value
- doesn't match the manifest URL of the application cache being
- processed, then the user agent should mark the entry as being
- <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>.</p>
+ <li><p>As an optimization, if the resource is an HTML or XML file whose root element is an
+ <code><a href=#the-html-element>html</a></code> element with a <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attribute
+ whose value doesn't match the manifest URL of the application cache being processed, then the
+ user agent should mark the entry as being <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>.</p>
</ol></li>
@@ -71595,148 +71492,127 @@
true, the <code title=dom-ProgressEvents-total>total</code> and the <code title=dom-ProgressEvents-loaded>loaded</code> attributes must be set to the number of files in
<var title="">file list</var>. The default action of these events must be, if the user agent
<a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to the
- user that all the files have been downloaded. <a href=#refsPROGRESS>[PROGRESS]</a></li>
+ user that all the files have been downloaded. <a href=#refsXHR>[XHR]</a></li>
<li><p>Store the list of <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespaces</a>,
- and the URLs of the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a> that they
- map to, in <var title="">new cache</var>.</li>
+ and the URLs of the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a> that they map
+ to, in <var title="">new cache</var>.</li>
- <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 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>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>Store the value of the new <a href=#concept-appcache-mode title=concept-appcache-mode>cache mode flag</a> in <var title="">new cache</var>.</li>
+ <li><p>Store the value of the new <a href=#concept-appcache-mode title=concept-appcache-mode>cache mode 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
- entries</a>, wait for the resource for this entry to have
- either completely downloaded or failed.</p>
+ <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 entries</a>, wait for the
+ resource for this entry to have either completely downloaded or failed.</p>
- <p>If the download failed (e.g. the server returns a 4xx or 5xx
- response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or
- equivalent</a>, or there is a DNS error, the connection times
- out, or the user cancels the download), or if the resource is
- labeled with the "no-store" cache directive, then run these
- substeps:</p>
+ <p>If the download failed (e.g. the server returns a 4xx or 5xx response <a href=#concept-http-equivalent-codes title=concept-http-equivalent-codes>or equivalent</a>, or there is a DNS error, the
+ connection times out, or the user cancels the download), or if the resource is labeled with the
+ "no-store" cache directive, then run these substeps:</p>
- <ol><li><p>Unassociate the <code><a href=#document>Document</a></code> for this entry from
- <var title="">new cache</var>.</li>
+ <ol><li><p>Unassociate the <code><a href=#document>Document</a></code> for this entry from <var title="">new
+ cache</var>.</li>
- <li><p><a href=#queue-a-post-load-task>Queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
- <code><a href=#document>Document</a></code> for this entry, if there still is one. The
- default action of this event must be, if the user agent
- <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
- user interface indicating to the user that the user agent failed
- to save the application for offline use.</p>
+ <li><p><a href=#queue-a-post-load-task>Queue a post-load task</a> to <a href=#fire-a-simple-event>fire a simple event</a> that is
+ cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
+ <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <code><a href=#document>Document</a></code> for this entry, if there
+ still is one. The default action of this event must be, if the user agent <a href=#shows-caching-progress>shows caching
+ progress</a>, the display of some sort of user interface indicating to the user that the
+ user agent failed to save the application for offline use.</p>
<li>
- <p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
- attempt</a> and this entry is the last entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
- entries</a>, then run these further substeps:</p>
+ <p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache attempt</a> and this entry is
+ the last entry in <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master entries</a>, then run these
+ further substeps:</p>
- <ol><li><p>Discard <var title="">cache group</var> and its only
- <a href=#application-cache>application cache</a>, <var title="">new
- cache</var>.</p>
+ <ol><li><p>Discard <var title="">cache group</var> and its only <a href=#application-cache>application cache</a>,
+ <var title="">new cache</var>.</p>
- <li><p>If appropriate, remove any user interface indicating
- that an update for this cache is in progress.</li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is
+ in progress.</li>
- <li><p>Abort the <a href=#application-cache-download-process>application cache download
- process</a>.</li>
+ <li><p>Abort the <a href=#application-cache-download-process>application cache download process</a>.</li>
</ol></li>
- <li><p>Otherwise, remove this entry from <var title="">cache
- group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list
- of pending master entries</a>.</li>
+ <li><p>Otherwise, remove this entry from <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master entries</a>.</li>
- </ol><p>Otherwise, store the resource for this entry in <var title="">new cache</var>, if it isn't already there, and
- categorize its entry as a <a href=#concept-appcache-master title=concept-appcache-master>master entry</a>.</p>
+ </ol><p>Otherwise, store the resource for this entry in <var title="">new cache</var>, if it isn't
+ already there, and categorize its entry as a <a href=#concept-appcache-master title=concept-appcache-master>master
+ entry</a>.</p>
</li>
<li>
- <p><a href=#fetch>Fetch</a><!--FETCH--> the resource from <var title="">manifest URL</var> again, with the <i>synchronous
- flag</i> set, and let <var title="">second manifest</var> be that
- resource. HTTP caching semantics should again be honored for this
- request.</p> <!-- http-origin privacy sensitive, though it doesn't
- matter, since this can never be cross-origin -->
+ <p><a href=#fetch>Fetch</a><!--FETCH--> the resource from <var title="">manifest URL</var> again, with
+ the <i>synchronous flag</i> set, and let <var title="">second manifest</var> be that resource.
+ HTTP caching semantics should again be honored for this request.</p> <!-- http-origin privacy
+ sensitive, though it doesn't matter, since this can never be cross-origin -->
- <p class=note>Since caching can be honored, authors are
- encouraged to avoid setting the cache headers on the manifest in
- such a way that the user agent would simply not contact the
- network for this second request; otherwise, the user agent would
- not notice if the cache had changed during the cache update
- process.</p>
+ <p class=note>Since caching can be honored, authors are encouraged to avoid setting the cache
+ headers on the manifest in such a way that the user agent would simply not contact the network
+ for this second request; otherwise, the user agent would not notice if the cache had changed
+ during the cache update process.</p>
</li>
<li>
- <p>If the previous step failed for any reason, or if the fetching
- attempt involved a redirect, or if <var title="">second
- manifest</var> and <var title="">manifest</var> are not
- byte-for-byte identical, then schedule a rerun of the entire
- algorithm with the same parameters after a short delay, and run
- the <a href=#cache-failure-steps>cache failure steps</a>.</p>
+ <p>If the previous step failed for any reason, or if the fetching attempt involved a redirect,
+ or if <var title="">second manifest</var> and <var title="">manifest</var> are not byte-for-byte
+ identical, then schedule a rerun of the entire algorithm with the same parameters after a short
+ delay, and run the <a href=#cache-failure-steps>cache failure steps</a>.</p>
</li>
<li>
- <p>Otherwise, store <var title="">manifest</var> in <var title="">new cache</var>, if it's not there already, and
- categorize its entry as <a href=#concept-appcache-manifest title=concept-appcache-manifest>the manifest</a>.</p>
+ <p>Otherwise, store <var title="">manifest</var> in <var title="">new cache</var>, if it's not
+ there already, and categorize its entry as <a href=#concept-appcache-manifest title=concept-appcache-manifest>the
+ manifest</a>.</p>
</li>
- <li><p>Set the <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> of
- <var title="">new cache</var> to <i>complete</i>.</li>
+ <li><p>Set the <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> of <var title="">new cache</var> to <i>complete</i>.</li>
<li><p>Let <var title="">task list</var> be an empty list of <a href=#concept-task title=concept-task>tasks</a>.</p>
<li>
- <p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
- attempt</a>, then for each <a href=#cache-host>cache host</a> associated
- with an <a href=#application-cache>application cache</a> in <var title="">cache
- group</var>, create a <a href=#concept-task title=concept-task>task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-cached><a href=#event-appcache-cached>cached</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
- user interface indicating to the user that the application has
- been cached and that they can now use it offline.</p>
+ <p>If this is a <a href=#concept-appcache-cache title=concept-appcache-cache>cache attempt</a>, then for each
+ <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in <var title="">cache
+ group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
+ that is cancelable named <code title=event-appcache-cached><a href=#event-appcache-cached>cached</a></code> at the
+ <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>, and append it to <var title="">task list</var>. The default action of these events must be, if the user agent
+ <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to
+ the user that the application has been cached and that they can now use it offline.</p>
<p>Otherwise, it is an <a href=#concept-appcache-upgrade title=concept-appcache-upgrade>upgrade attempt</a>. For each
- <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application
- cache</a> in <var title="">cache group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple
- event</a> that is cancelable named <code title=event-appcache-updateready><a href=#event-appcache-updateready>updateready</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
- user interface indicating to the user that a new version is
- available and that they can activate it by reloading the page.</p>
+ <a href=#cache-host>cache host</a> associated with an <a href=#application-cache>application cache</a> in <var title="">cache
+ group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
+ that is cancelable named <code title=event-appcache-updateready><a href=#event-appcache-updateready>updateready</a></code> at the
+ <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>, and append it to <var title="">task list</var>. The default action of these events must be, if the user agent
+ <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to
+ the user that a new version is available and that they can activate it by reloading the
+ page.</p>
</li>
- <li><p>If appropriate, remove any user interface indicating that
- an update for this cache is in progress.</li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</li>
- <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>update
- status</a> of <var title="">cache group</var> to
- <i>idle</i>.</li>
+ <li><p>Set the <a href=#concept-appcache-status title=concept-appcache-status>update status</a> of <var title="">cache
+ group</var> to <i>idle</i>.</li>
- <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load
- task">queue that task as a post-load task</a>.</li>
+ <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load task">queue that task as a post-load task</a>.</li>
</ol><p>The <dfn id=cache-failure-steps>cache failure steps</dfn> are as follows:</p>
@@ -71744,83 +71620,66 @@
<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
- entries</a>, run the following further substeps. These steps
- may be run in parallel for two or more entries at a time.</p>
+ <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 entries</a>, run the
+ following further substeps. These steps may be run in parallel for two or more entries at a
+ time.</p>
- <ol><li><p>Wait for the resource for this entry to have either
- completely downloaded or failed.</p>
+ <ol><li><p>Wait for the resource for this entry to have either completely downloaded or failed.</p>
- <li><p>Unassociate the <code><a href=#document>Document</a></code> for this entry from
- its <a href=#application-cache>application cache</a>, if it has one.</li>
+ <li><p>Unassociate the <code><a href=#document>Document</a></code> for this entry from its <a href=#application-cache>application
+ cache</a>, if it has one.</li>
- <li><p>Create a <a href=#concept-task title=concept-task>task</a> to
- <a href=#fire-a-simple-event>fire a simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the
- <code><a href=#document>Document</a></code> for this entry, if there still is one, and
- append it to <var title="">task list</var>. The default action of
- these events must be, if the user agent <a href=#shows-caching-progress>shows caching
- progress</a>, the display of some sort of user interface
- indicating to the user that the user agent failed to save the
- application for offline use.</p>
+ <li><p>Create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple event</a> that
+ is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
+ <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <code><a href=#document>Document</a></code> for this entry, if there
+ still is one, and append it to <var title="">task list</var>. The default action of these
+ events must be, if the user agent <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort
+ of user interface indicating to the user that the user agent failed to save the application for
+ offline use.</p>
</ol></li>
- <li><p>For each <a href=#cache-host>cache host</a> still associated with an
- <a href=#application-cache>application cache</a> in <var title="">cache group</var>,
- create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a
- simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at the
- <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache
- host</a>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of
- user interface indicating to the user that the user agent failed to
- save the application for offline use.</li>
+ <li><p>For each <a href=#cache-host>cache host</a> still associated with an <a href=#application-cache>application cache</a>
+ in <var title="">cache group</var>, create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire
+ a simple event</a> that is cancelable named <code title=event-appcache-error><a href=#event-appcache-error>error</a></code> at
+ the <code><a href=#applicationcache>ApplicationCache</a></code> singleton of the <a href=#cache-host>cache host</a>, and append it to <var title="">task list</var>. The default action of these events must be, if the user agent
+ <a href=#shows-caching-progress>shows caching progress</a>, the display of some sort of user interface indicating to the
+ user that the user agent failed to save the application for offline use.</li>
- <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master
- entries</a>.</li>
+ <li><p>Empty <var title="">cache group</var>'s <a href=#concept-appcache-pending-masters title=concept-appcache-pending-masters>list of pending master entries</a>.</li>
- <li><p>If <var title="">cache group</var> has an <a href=#application-cache>application
- cache</a> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is
- <i>incomplete</i>, then discard that <a href=#application-cache>application
- cache</a>.</p>
+ <li><p>If <var title="">cache group</var> has an <a href=#application-cache>application cache</a> whose <a href=#concept-appcache-completeness title=concept-appcache-completeness>completeness flag</a> is <i>incomplete</i>, then discard
+ that <a href=#application-cache>application cache</a>.</p>
- <li><p>If appropriate, remove any user interface indicating that an
- update for this cache is in progress.</li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</li>
- <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a>
- of <var title="">cache group</var> be <i>idle</i>.</li>
+ <li><p>Let the <a href=#concept-appcache-status title=concept-appcache-status>status</a> of <var title="">cache
+ group</var> be <i>idle</i>.</li>
- <li><p>If this was a <a href=#concept-appcache-cache title=concept-appcache-cache>cache
- attempt</a>, discard <var title="">cache group</var>
- altogether.</p>
+ <li><p>If this was a <a href=#concept-appcache-cache title=concept-appcache-cache>cache attempt</a>, discard <var title="">cache group</var> altogether.</p>
- <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load
- task">queue that task as a post-load task</a>.</li>
+ <li><p>For each <a href=#concept-task title=concept-task>task</a> in <var title="">task list</var>, <a href=#queue-a-post-load-task title="queue a post-load task">queue that task as a post-load task</a>.</li>
- <li><p>Abort the <a href=#application-cache-download-process>application cache download
- process</a>.</li>
+ <li><p>Abort the <a href=#application-cache-download-process>application cache download process</a>.</li>
- </ol><p>Attempts to <a href=#fetch>fetch</a> resources as part of the
- <a href=#application-cache-download-process>application cache download process</a> may be done with
- cache-defeating semantics, to avoid problems with stale or
+ </ol><p>Attempts to <a href=#fetch>fetch</a> resources as part of the <a href=#application-cache-download-process>application cache download
+ process</a> may be done with cache-defeating semantics, to avoid problems with stale or
inconsistent intermediary caches.</p>
- <hr><p>User agents may invoke the <a href=#application-cache-download-process>application cache download
- process</a>, in the background, for any <a href=#application-cache-group>application cache
- group</a>, at any time (with no <a href=#cache-host>cache host</a>). This
- allows user agents to keep caches primed and to update caches even
- before the user visits a site.</p>
+ <hr><p>User agents may invoke the <a href=#application-cache-download-process>application cache download process</a>, in the background,
+ for any <a href=#application-cache-group>application cache group</a>, at any time (with no <a href=#cache-host>cache host</a>). This
+ allows user agents to keep caches primed and to update caches even before the user visits a
+ site.</p>
- <hr><p>Each <code><a href=#document>Document</a></code> has a list of <dfn id=pending-application-cache-download-process-tasks>pending application
- cache download process tasks</dfn> that is used to delay events
- fired by the algorithm above until the document's <code title=event-load>load</code> event has fired. When the
- <code><a href=#document>Document</a></code> is created, the list must be empty.</p>
+ <hr><p>Each <code><a href=#document>Document</a></code> has a list of <dfn id=pending-application-cache-download-process-tasks>pending application cache download process
+ tasks</dfn> that is used to delay events fired by the algorithm above until the document's <code title=event-load>load</code> event has fired. When the <code><a href=#document>Document</a></code> is created, the
+ list must be empty.</p>
- <p>When the steps above say to <dfn id=queue-a-post-load-task>queue a post-load task</dfn>
- <var title="">task</var>, where <var title="">task</var> is a <a href=#concept-task title=concept-task>task</a> that dispatches an event on a
- target <code><a href=#applicationcache>ApplicationCache</a></code> object <var title="">target</var>, the user agent must run the appropriate steps
- from the following list:</p>
+ <p>When the steps above say to <dfn id=queue-a-post-load-task>queue a post-load task</dfn> <var title="">task</var>, where
+ <var title="">task</var> is a <a href=#concept-task title=concept-task>task</a> that dispatches an event on a
+ target <code><a href=#applicationcache>ApplicationCache</a></code> object <var title="">target</var>, the user agent must run
+ the appropriate steps from the following list:</p>
<dl><dt>If <var title="">target</var>'s <code><a href=#document>Document</a></code> is
<a href=#ready-for-post-load-tasks>ready for post-load tasks</a></dt>
@@ -71829,12 +71688,11 @@
<dt>Otherwise</dt>
- <dd><p>Add <var title="">task</var> to <var title="">target</var>'s
- <code><a href=#document>Document</a></code>'s list of <a href=#pending-application-cache-download-process-tasks>pending application cache
- download process tasks</a>.</dd>
+ <dd><p>Add <var title="">task</var> to <var title="">target</var>'s <code><a href=#document>Document</a></code>'s list
+ of <a href=#pending-application-cache-download-process-tasks>pending application cache download process tasks</a>.</dd>
- </dl><p>The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the <a href=#networking-task-source>networking task
- source</a>.</p>
+ </dl><p>The <a href=#task-source>task source</a> for these <a href=#concept-task title=concept-task>tasks</a> is the
+ <a href=#networking-task-source>networking task source</a>.</p>
@@ -103740,7 +103598,7 @@
<dd><cite><a href=http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions>Microformats Wiki: existing rel values</a></cite>. Microformats.</dd>
<dt id=refsMIMESNIFF>[MIMESNIFF]</dt>
- <dd><cite><a href=http://mimesniff.spec.whatwg.org/>MIME Sniffing</a></cite>, A. Barth, I. Hickson. WHATWG.</dd>
+ <dd><cite><a href=http://mimesniff.spec.whatwg.org/>MIME Sniffing</a></cite>, G. Hemsley. WHATWG.</dd>
<dt id=refsMNG>[MNG]</dt>
<dd><cite><a href=http://www.libpng.org/pub/mng/spec/>MNG (Multiple-image Network Graphics) Format</a></cite>. G. Randers-Pehrson.</dd>
@@ -103801,9 +103659,6 @@
<dt id=refsPPUTF8>[PPUTF8]</dt>
<dd>(Non-normative) <cite><a href=http://www.sw.it.aoyama.ac.jp/2012/pub/IUC11-UTF-8.pdf>The Properties and Promises <!-- Promizes (sic) --> of UTF-8</a></cite>, M. Dürst. University of Zürich. In <cite>Proceedings of the 11th International Unicode Conference</cite>.</dd>
- <dt id=refsPROGRESS>[PROGRESS]</dt>
- <dd><cite><a href=http://dev.w3.org/2006/webapi/progress/>Progress Events</a></cite>, A. van Kesteren. W3C.</dd>
-
<dt id=refsPSL>[PSL]</dt>
<dd><cite><a href=http://publicsuffix.org/>Public Suffix List</a></cite>.
Mozilla Foundation.</dd>
Modified: source
===================================================================
--- source 2012-12-04 23:55:58 UTC (rev 7562)
+++ source 2012-12-05 00:19:19 UTC (rev 7563)
@@ -83096,52 +83096,40 @@
<h4>Downloading or updating an application cache</h4>
- <p>When the user agent is required (by other parts of this
- specification) to start the <dfn>application cache download
- process</dfn> for an <span>absolute URL</span> purported to identify
- a <span title="concept-appcache-manifest">manifest</span>, or for an
- <span>application cache group</span>, potentially given a particular
- <span>cache host</span>, and potentially given a <span
- title="concept-appcache-master">master</span> resource, the user
- agent must run the steps below. These steps are always run
- asynchronously, in parallel with the <span>event loop</span> <span
- title="concept-task">tasks</span>.</p>
+ <p>When the user agent is required (by other parts of this specification) to start the
+ <dfn>application cache download process</dfn> for an <span>absolute URL</span> purported to
+ identify a <span title="concept-appcache-manifest">manifest</span>, or for an <span>application
+ cache group</span>, potentially given a particular <span>cache host</span>, and potentially given
+ a <span title="concept-appcache-master">master</span> resource, the user agent must run the steps
+ below. These steps are always run asynchronously, in parallel with the <span>event loop</span>
+ <span title="concept-task">tasks</span>.</p>
- <p>Some of these steps have requirements that only apply if the user
- agent <dfn>shows caching progress</dfn>. Support for this is
- optional. Caching progress UI could consist of a progress bar or
- message panel in the user agent's interface, or an overlay, or
- something else. Certain events fired during the <span>application
- cache download process</span> allow the script to override the display
- of such an interface. The goal of this is to allow Web applications
- to provide more seamless update mechanisms, hiding from the user the
- mechanics of the application cache mechanism. User agents may
- display user interfaces independent of this, but are encouraged to
- not show prominent update progress notifications for applications
- that cancel the relevant events.</p>
+ <p>Some of these steps have requirements that only apply if the user agent <dfn>shows caching
+ progress</dfn>. Support for this is optional. Caching progress UI could consist of a progress bar
+ or message panel in the user agent's interface, or an overlay, or something else. Certain events
+ fired during the <span>application cache download process</span> allow the script to override the
+ display of such an interface. The goal of this is to allow Web applications to provide more
+ seamless update mechanisms, hiding from the user the mechanics of the application cache mechanism.
+ User agents may display user interfaces independent of this, but are encouraged to not show
+ prominent update progress notifications for applications that cancel the relevant events.</p>
<p class="note">These events are delayed until after the <code
title="event-load">load</code> event has fired.</p>
- <p>The <span>application cache download process</span> steps are as
- follows:
+ <p>The <span>application cache download process</span> steps are as follows:
<ol>
- <li><p>Optionally, wait until the permission to start the
- <span>application cache download process</span> has been obtained
- from the user and until the user agent is confident that the
- network is available. This could include doing nothing until the
- user explicitly opts-in to caching the site, or could involve
- prompting the user for permission. The algorithm might never get
- past this point. (This step is particularly intended to be used by
- user agents running on severely space-constrained devices or in
- highly privacy-sensitive environments).</p></li>
+ <li><p>Optionally, wait until the permission to start the <span>application cache download
+ process</span> has been obtained from the user and until the user agent is confident that the
+ network is available. This could include doing nothing until the user explicitly opts-in to
+ caching the site, or could involve prompting the user for permission. The algorithm might never
+ get past this point. (This step is particularly intended to be used by user agents running on
+ severely space-constrained devices or in highly privacy-sensitive environments).</p></li>
<li>
- <p>Atomically, so as to avoid race conditions, perform the
- following substeps:</p>
+ <p>Atomically, so as to avoid race conditions, perform the following substeps:</p>
<ol>
@@ -83151,42 +83139,34 @@
<dl class="switch">
- <dt>If these steps were invoked with an <span>absolute
- URL</span> purported to identify a <span
- title="concept-appcache-manifest">manifest</span></dt>
+ <dt>If these steps were invoked with an <span>absolute URL</span> purported to identify a
+ <span title="concept-appcache-manifest">manifest</span></dt>
<dd>
- <p>Let <var title="">manifest URL</var> be that <span>absolute
- URL</span>.</p>
+ <p>Let <var title="">manifest URL</var> be that <span>absolute URL</span>.</p>
- <p>If there is no <span>application cache group</span>
- identified by <var title="">manifest URL</var>, then create a
- new <span>application cache group</span> identified by <var
- title="">manifest URL</var>. Initially, it has no <span
- title="application cache">application caches</span>. One will
- be created later in this algorithm.</p>
+ <p>If there is no <span>application cache group</span> identified by <var title="">manifest
+ URL</var>, then create a new <span>application cache group</span> identified by <var
+ title="">manifest URL</var>. Initially, it has no <span title="application
+ cache">application caches</span>. One will be created later in this algorithm.</p>
</dd>
- <dt>If these steps were invoked with an <span>application cache
- group</span></dt>
+ <dt>If these steps were invoked with an <span>application cache group</span></dt>
<dd>
- <p>Let <var title="">manifest URL</var> be the <span>absolute
- URL</span> of the <span
- title="concept-appcache-manifest">manifest</span> used to
- identify the <span>application cache group</span> to be
- updated.</p>
+ <p>Let <var title="">manifest URL</var> be the <span>absolute URL</span> of the <span
+ title="concept-appcache-manifest">manifest</span> used to identify the <span>application
+ cache group</span> to be updated.</p>
<p>If that <span>application cache group</span> is <span
- title="concept-appcache-obsolete">obsolete</span>, then abort
- this instance of the <span>application cache download
- process</span>. This can happen if another instance of this
- algorithm found the manifest to be 404 or 410 while this
- algorithm was waiting in the first step above.</p>
+ title="concept-appcache-obsolete">obsolete</span>, then abort this instance of the
+ <span>application cache download process</span>. This can happen if another instance of this
+ algorithm found the manifest to be 404 or 410 while this algorithm was waiting in the first
+ step above.</p>
</dd>
@@ -83194,183 +83174,137 @@
</li>
- <li><p>Let <var title="">cache group</var> be the
- <span>application cache group</span> identified by <var
- title="">manifest URL</var>.</p></li>
+ <li><p>Let <var title="">cache group</var> be the <span>application cache group</span>
+ identified by <var title="">manifest URL</var>.</p></li>
- <li><p>If these steps were invoked with a <span
- title="concept-appcache-master">master</span> resource, then add
- the resource, along with the resource's <code>Document</code>, to
- <var title="">cache group</var>'s <span
- title="concept-appcache-pending-masters">list of pending master
- entries</span>.</p></li>
+ <li><p>If these steps were invoked with a <span title="concept-appcache-master">master</span>
+ resource, then add the resource, along with the resource's <code>Document</code>, to <var
+ title="">cache group</var>'s <span title="concept-appcache-pending-masters">list of pending
+ master entries</span>.</p></li>
- <li><p>If these steps were invoked with a <span>cache
- host</span>, and the <span
- title="concept-appcache-status">status</span> of <var
- title="">cache group</var> is <i>checking</i> or
- <i>downloading</i>, then <span>queue a post-load task</span> to
- <span>fire a simple event</span> named <code
- title="event-appcache-checking">checking</code> that is
- cancelable at the <code>ApplicationCache</code> singleton of that
- <span>cache host</span>. The default action of this event must
- be, if the user agent <span>shows caching progress</span>, the
- display of some sort of user interface indicating to the user
- that the user agent is checking to see if it can download the
- application.</p></li>
+ <li><p>If these steps were invoked with a <span>cache host</span>, and the <span
+ title="concept-appcache-status">status</span> of <var title="">cache group</var> is
+ <i>checking</i> or <i>downloading</i>, then <span>queue a post-load task</span> to <span>fire a
+ simple event</span> named <code title="event-appcache-checking">checking</code> that is
+ cancelable at the <code>ApplicationCache</code> singleton of that <span>cache host</span>. The
+ default action of this event must be, if the user agent <span>shows caching progress</span>,
+ the display of some sort of user interface indicating to the user that the user agent is
+ checking to see if it can download the application.</p></li>
- <li><p>If these steps were invoked with a <span>cache
- host</span>, and the <span
- title="concept-appcache-status">status</span> of <var
- title="">cache group</var> is <i>downloading</i>, then also
- <span>queue a post-load task</span> to <span>fire a simple
- event</span> named <code
- title="event-appcache-downloading">downloading</code> that is
- cancelable at the <code>ApplicationCache</code> singleton of that
- <span>cache host</span>. The default action of this event must
- be, if the user agent <span>shows caching progress</span>, the
- display of some sort of user interface indicating to the user the
- application is being downloaded.</p></li>
+ <li><p>If these steps were invoked with a <span>cache host</span>, and the <span
+ title="concept-appcache-status">status</span> of <var title="">cache group</var> is
+ <i>downloading</i>, then also <span>queue a post-load task</span> to <span>fire a simple
+ event</span> named <code title="event-appcache-downloading">downloading</code> that is
+ cancelable at the <code>ApplicationCache</code> singleton of that <span>cache host</span>. The
+ default action of this event must be, if the user agent <span>shows caching progress</span>,
+ the display of some sort of user interface indicating to the user the application is being
+ downloaded.</p></li>
- <li><p>If the <span title="concept-appcache-status">status</span>
- of the <var title="">cache group</var> is either <i>checking</i>
- or <i>downloading</i>, then abort this instance of the
- <span>application cache download process</span>, as an update is
- already in progress.</p></li>
+ <li><p>If the <span title="concept-appcache-status">status</span> of the <var title="">cache
+ group</var> is either <i>checking</i> or <i>downloading</i>, then abort this instance of the
+ <span>application cache download process</span>, as an update is already in progress.</p></li>
- <li><p>Set the <span
- title="concept-appcache-status">status</span> of <var
- title="">cache group</var> to <i>checking</i>.</p>
+ <li><p>Set the <span title="concept-appcache-status">status</span> of <var title="">cache
+ group</var> to <i>checking</i>.</p>
- <li><p>For each <span>cache host</span> associated with an
- <span>application cache</span> in <var title="">cache
- group</var>, <span>queue a post-load task</span> to <span>fire a
- simple event</span> that is cancelable named <code
- title="event-appcache-checking">checking</code> at the
- <code>ApplicationCache</code> singleton of the <span>cache
- host</span>. The default action of these events must be, if the
- user agent <span>shows caching progress</span>, the display of
- some sort of user interface indicating to the user that the user
- agent is checking for the availability of updates.</p></li>
+ <li><p>For each <span>cache host</span> associated with an <span>application cache</span> in
+ <var title="">cache group</var>, <span>queue a post-load task</span> to <span>fire a simple
+ event</span> that is cancelable named <code title="event-appcache-checking">checking</code> at
+ the <code>ApplicationCache</code> singleton of the <span>cache host</span>. The default action
+ of these events must be, if the user agent <span>shows caching progress</span>, the display of
+ some sort of user interface indicating to the user that the user agent is checking for the
+ availability of updates.</p></li>
</ol>
<p class="note">The remainder of the steps run asynchronously.</p>
- <p>If <var title="">cache group</var> already has an
- <span>application cache</span> in it, then this is an <dfn
- title="concept-appcache-upgrade">upgrade attempt</dfn>. Otherwise,
- this is a <dfn title="concept-appcache-cache">cache
- attempt</dfn>.</p>
+ <p>If <var title="">cache group</var> already has an <span>application cache</span> in it, then
+ this is an <dfn title="concept-appcache-upgrade">upgrade attempt</dfn>. Otherwise, this is a
+ <dfn title="concept-appcache-cache">cache attempt</dfn>.</p>
</li>
- <li><p>If this is a <span title="concept-appcache-cache">cache
- attempt</span>, then this algorithm was invoked with a <span>cache
- host</span>; <span>queue a post-load task</span> to <span>fire a
- simple event</span> named <code
- title="event-appcache-checking">checking</code> that is cancelable
- at the <code>ApplicationCache</code> singleton of that <span>cache
- host</span>. The default action of this event must be, if the user
- agent <span>shows caching progress</span>, the display of some sort
- of user interface indicating to the user that the user agent is
- checking for the availability of updates.</p></li>
+ <li><p>If this is a <span title="concept-appcache-cache">cache attempt</span>, then this
+ algorithm was invoked with a <span>cache host</span>; <span>queue a post-load task</span> to
+ <span>fire a simple event</span> named <code title="event-appcache-checking">checking</code> that
+ is cancelable at the <code>ApplicationCache</code> singleton of that <span>cache host</span>. The
+ default action of this event must be, if the user agent <span>shows caching progress</span>, the
+ display of some sort of user interface indicating to the user that the user agent is checking for
+ the availability of updates.</p></li>
<li>
- <p><i>Fetching the manifest</i>: <span>Fetch</span><!--FETCH-->
- the resource from <var title="">manifest URL</var> with the
- <i>synchronous flag</i> set, and let <var title="">manifest</var>
- be that resource. HTTP caching semantics should be honored for
- this request.</p> <!-- http-origin privacy sensitive, though it
- doesn't matter, since this can never be cross-origin -->
+ <p><i>Fetching the manifest</i>: <span>Fetch</span><!--FETCH--> the resource from <var
+ title="">manifest URL</var> with the <i>synchronous flag</i> set, and let <var
+ title="">manifest</var> be that resource. HTTP caching semantics should be honored for this
+ request.</p> <!-- http-origin privacy sensitive, though it doesn't matter, since this can never
+ be cross-origin -->
- <p>Parse <var title="">manifest</var> according to the <span
- title="parse a manifest">rules for parsing manifests</span>,
- obtaining a list of <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, entries for the <span
- title="concept-appcache-onlinewhitelist">online whitelist</span>,
- and values for the <span
- title="concept-appcache-onlinewhitelist-wildcard">online whitelist
- wildcard flag</span> and the <span
- title="concept-appcache-mode">cache mode flag</span>.</p>
+ <p>Parse <var title="">manifest</var> according to the <span title="parse a manifest">rules for
+ parsing manifests</span>, obtaining a list of <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, entries for
+ the <span title="concept-appcache-onlinewhitelist">online whitelist</span>, and values for the
+ <span title="concept-appcache-onlinewhitelist-wildcard">online whitelist wildcard flag</span>
+ and the <span title="concept-appcache-mode">cache mode flag</span>.</p>
- <p class="note">The <span>MIME type</span> of the resource is
- ignored — it is assumed to be
- <code>text/cache-manifest</code>. In the future, if new manifest
- formats are supported, the different types will probably be
- distinguished on the basis of the file signatures (for the current
- format, that is the "<code title="">CACHE MANIFEST</code>"
- string at the top of the file).</p>
+ <p class="note">The <span>MIME type</span> of the resource is ignored — it is assumed to
+ be <code>text/cache-manifest</code>. In the future, if new manifest formats are supported, the
+ different types will probably be distinguished on the basis of the file signatures (for the
+ current format, that is the "<code title="">CACHE MANIFEST</code>" string at the top of the
+ file).</p>
</li>
<li>
- <p>If <i>fetching the manifest</i> fails due to a 404 or 410
- response <span title="concept-http-equivalent-codes">or
- equivalent</span>, then run these substeps:</p>
+ <p>If <i>fetching the manifest</i> fails due to a 404 or 410 response <span
+ title="concept-http-equivalent-codes">or equivalent</span>, then run these substeps:</p>
<ol>
<li><p>Mark <var title="">cache group</var> as <span
- title="concept-appcache-obsolete">obsolete</span>. This <var
- title="">cache group</var> no longer exists for any purpose other
- than the processing of <code>Document</code> objects already
- associated with an <span>application cache</span> in the <var
- title="">cache group</var>.</p></li>
+ title="concept-appcache-obsolete">obsolete</span>. This <var title="">cache group</var> no
+ longer exists for any purpose other than the processing of <code>Document</code> objects
+ already associated with an <span>application cache</span> in the <var title="">cache
+ group</var>.</p></li>
- <li><p>Let <var title="">task list</var> be an empty list of
- <span title="concept-task">tasks</span>.</p>
+ <li><p>Let <var title="">task list</var> be an empty list of <span
+ title="concept-task">tasks</span>.</p>
- <li><p>For each <span>cache host</span> associated with an
- <span>application cache</span> in <var title="">cache
- group</var>, create a <span title="concept-task">task</span> to
- <span>fire a simple event</span> named <code
- title="event-appcache-obsolete">obsolete</code> that is
- cancelable at the <code>ApplicationCache</code> singleton of the
- <span>cache host</span>, and append it to <var title="">task
- list</var>. The default action of these events must be, if the
- user agent <span>shows caching progress</span>, the display of
- some sort of user interface indicating to the user that the
- application is no longer available for offline use.</p></li>
+ <li><p>For each <span>cache host</span> associated with an <span>application cache</span> in
+ <var title="">cache group</var>, create a <span title="concept-task">task</span> to <span>fire
+ a simple event</span> named <code title="event-appcache-obsolete">obsolete</code> that is
+ cancelable at the <code>ApplicationCache</code> singleton of the <span>cache host</span>, and
+ append it to <var title="">task list</var>. The default action of these events must be, if the
+ user agent <span>shows caching progress</span>, the display of some sort of user interface
+ indicating to the user that the application is no longer available for offline use.</p></li>
<li><p>For each entry in <var title="">cache group</var>'s <span
- title="concept-appcache-pending-masters">list of pending master
- entries</span>, create a <span title="concept-task">task</span>
- to <span>fire a simple event</span> that is cancelable named
+ title="concept-appcache-pending-masters">list of pending master entries</span>, create a <span
+ title="concept-task">task</span> to <span>fire a simple event</span> that is cancelable named
<code title="event-appcache-error">error</code> (not <code
- title="event-appcache-obsolete">obsolete</code>!) at the
- <code>ApplicationCache</code> singleton of the
- <code>Document</code> for this entry, if there still is one, and
- append it to <var title="">task list</var>. The default action of
- this event must be, if the user agent <span>shows caching
- progress</span>, the display of some sort of user interface
- indicating to the user that the user agent failed to save the
- application for offline use.</p></li>
+ title="event-appcache-obsolete">obsolete</code>!) at the <code>ApplicationCache</code>
+ singleton of the <code>Document</code> for this entry, if there still is one, and append it to
+ <var title="">task list</var>. The default action of this event must be, if the user agent
+ <span>shows caching progress</span>, the display of some sort of user interface indicating to
+ the user that the user agent failed to save the application for offline use.</p></li>
- <li><p>If <var title="">cache group</var> has an
- <span>application cache</span> whose <span
- title="concept-appcache-completeness">completeness flag</span> is
- <i>incomplete</i>, then discard that <span>application
- cache</span>.</p>
+ <li><p>If <var title="">cache group</var> has an <span>application cache</span> whose <span
+ title="concept-appcache-completeness">completeness flag</span> is <i>incomplete</i>, then
+ discard that <span>application cache</span>.</p>
- <li><p>If appropriate, remove any user interface indicating that
- an update for this cache is in progress.</p></li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</p></li>
- <li><p>Let the <span
- title="concept-appcache-status">status</span> of <var
- title="">cache group</var> be <i>idle</i>.</p></li>
+ <li><p>Let the <span title="concept-appcache-status">status</span> of <var title="">cache
+ group</var> be <i>idle</i>.</p></li>
- <li><p>For each <span title="concept-task">task</span> in <var
- title="">task list</var>, <span title="queue a post-load
- task">queue that task as a post-load task</span>.</p></li>
+ <li><p>For each <span title="concept-task">task</span> in <var title="">task list</var>, <span
+ title="queue a post-load task">queue that task as a post-load task</span>.</p></li>
- <li><p>Abort the <span>application cache download
- process</span>.</p></li>
+ <li><p>Abort the <span>application cache download process</span>.</p></li>
</ol>
@@ -83378,179 +83312,141 @@
<li>
- <p>Otherwise, if <i>fetching the manifest</i> fails in some other
- way (e.g. the server returns another 4xx or 5xx response <span
- title="concept-http-equivalent-codes">or equivalent</span>, or
- there is a DNS error, or the connection times out, or the user
- cancels the download, or the parser for manifests fails when
- checking the magic signature), or if the server returned a
- redirect, then run the <span>cache failure steps</span>. <a
- href="#refsHTTP">[HTTP]</a></p>
+ <p>Otherwise, if <i>fetching the manifest</i> fails in some other way (e.g. the server returns
+ another 4xx or 5xx response <span title="concept-http-equivalent-codes">or equivalent</span>, or
+ there is a DNS error, or the connection times out, or the user cancels the download, or the
+ parser for manifests fails when checking the magic signature), or if the server returned a
+ redirect, then run the <span>cache failure steps</span>. <a href="#refsHTTP">[HTTP]</a></p>
</li>
<li>
- <p>If this is an <span title="concept-appcache-upgrade">upgrade
- attempt</span> and the newly downloaded <var
- title="">manifest</var> is byte-for-byte identical to the manifest
- found in the <span title="concept-appcache-newer">newest</span>
- <span>application cache</span> in <var title="">cache group</var>,
- or the server reported it as "304 Not Modified" <span
- title="concept-http-equivalent-codes">or equivalent</span>, then
- run these substeps:</p>
+ <p>If this is an <span title="concept-appcache-upgrade">upgrade attempt</span> and the newly
+ downloaded <var title="">manifest</var> is byte-for-byte identical to the manifest found in the
+ <span title="concept-appcache-newer">newest</span> <span>application cache</span> in <var
+ title="">cache group</var>, or the server reported it as "304 Not Modified" <span
+ title="concept-http-equivalent-codes">or equivalent</span>, then run these substeps:</p>
<ol>
- <li><p>Let <var title="">cache</var> be the <span
- title="concept-appcache-newer">newest</span> <span>application
- cache</span> in <var title="">cache group</var>.</p></li>
+ <li><p>Let <var title="">cache</var> be the <span title="concept-appcache-newer">newest</span>
+ <span>application cache</span> in <var title="">cache group</var>.</p></li>
- <li><p>Let <var title="">task list</var> be an empty list of
- <span title="concept-task">tasks</span>.</p>
+ <li><p>Let <var title="">task list</var> be an empty list of <span
+ title="concept-task">tasks</span>.</p>
<li>
<p>For each entry in <var title="">cache group</var>'s <span
- title="concept-appcache-pending-masters">list of pending master
- entries</span>, wait for the resource for this entry to have
- either completely downloaded or failed.</p>
+ title="concept-appcache-pending-masters">list of pending master entries</span>, wait for the
+ resource for this entry to have either completely downloaded or failed.</p>
- <p>If the download failed (e.g. the server returns a 4xx or 5xx
- response <span title="concept-http-equivalent-codes">or
- equivalent</span>, or there is a DNS error, the connection times
- out, or the user cancels the download), or if the resource is
- labeled with the "no-store" cache directive, then create a <span
- title="concept-task">task</span> to <span>fire a simple
- event</span> that is cancelable named <code
- title="event-appcache-error">error</code> at the
- <code>ApplicationCache</code> singleton of the
- <code>Document</code> for this entry, if there still is one, and
- append it to <var title="">task list</var>. The default action
- of this event must be, if the user agent <span>shows caching
- progress</span>, the display of some sort of user interface
- indicating to the user that the user agent failed to save the
- application for offline use.</p>
+ <p>If the download failed (e.g. the server returns a 4xx or 5xx response <span
+ title="concept-http-equivalent-codes">or equivalent</span>, or there is a DNS error, the
+ connection times out, or the user cancels the download), or if the resource is labeled with
+ the "no-store" cache directive, then create a <span title="concept-task">task</span> to
+ <span>fire a simple event</span> that is cancelable named <code
+ title="event-appcache-error">error</code> at the <code>ApplicationCache</code> singleton of
+ the <code>Document</code> for this entry, if there still is one, and append it to <var
+ title="">task list</var>. The default action of this event must be, if the user agent
+ <span>shows caching progress</span>, the display of some sort of user interface indicating to
+ the user that the user agent failed to save the application for offline use.</p>
- <p>Otherwise, associate the <code>Document</code> for this entry
- with <var title="">cache</var>; store the resource for this
- entry in <var title="">cache</var>, if it isn't already there,
- and categorize its entry as a <span
- title="concept-appcache-master">master entry</span>. If the
- resource's <span>URL</span> has a <span
- title="url-fragment"><fragment></span> component, it must
- be removed from the entry in <var title="">cache</var>
- (application caches never include fragment identifiers).</p>
+ <p>Otherwise, associate the <code>Document</code> for this entry with <var
+ title="">cache</var>; store the resource for this entry in <var title="">cache</var>, if it
+ isn't already there, and categorize its entry as a <span
+ title="concept-appcache-master">master entry</span>. If the resource's <span>URL</span> has a
+ <span title="url-fragment"><fragment></span> component, it must be removed from the
+ entry in <var title="">cache</var> (application caches never include fragment
+ identifiers).</p>
</li>
- <li><p>For each <span>cache host</span> associated with an
- <span>application cache</span> in <var title="">cache
- group</var>, create a <span title="concept-task">task</span> to
- <span>fire a simple event</span> that is cancelable named <code
- title="event-appcache-noupdate">noupdate</code> at the
- <code>ApplicationCache</code> singleton of the <span>cache
- host</span>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <span>shows caching progress</span>, the display of some sort of
- user interface indicating to the user that the application is up
- to date.</p></li>
+ <li><p>For each <span>cache host</span> associated with an <span>application cache</span> in
+ <var title="">cache group</var>, create a <span title="concept-task">task</span> to <span>fire
+ a simple event</span> that is cancelable named <code
+ title="event-appcache-noupdate">noupdate</code> at the <code>ApplicationCache</code> singleton
+ of the <span>cache host</span>, and append it to <var title="">task list</var>. The default
+ action of these events must be, if the user agent <span>shows caching progress</span>, the
+ display of some sort of user interface indicating to the user that the application is up to
+ date.</p></li>
<li><p>Empty <var title="">cache group</var>'s <span
- title="concept-appcache-pending-masters">list of pending master
- entries</span>.</p></li>
+ title="concept-appcache-pending-masters">list of pending master entries</span>.</p></li>
- <li><p>If appropriate, remove any user interface indicating that
- an update for this cache is in progress.</p></li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</p></li>
- <li><p>Let the <span
- title="concept-appcache-status">status</span> of <var
- title="">cache group</var> be <i>idle</i>.</p></li>
+ <li><p>Let the <span title="concept-appcache-status">status</span> of <var title="">cache
+ group</var> be <i>idle</i>.</p></li>
- <li><p>For each <span title="concept-task">task</span> in <var
- title="">task list</var>, <span title="queue a post-load
- task">queue that task as a post-load task</span>.</p></li>
+ <li><p>For each <span title="concept-task">task</span> in <var title="">task list</var>, <span
+ title="queue a post-load task">queue that task as a post-load task</span>.</p></li>
- <li><p>Abort the <span>application cache download
- process</span>.</p></li>
+ <li><p>Abort the <span>application cache download process</span>.</p></li>
</ol>
</li>
- <li><p>Let <var title="">new cache</var> be a newly created
- <span>application cache</span> in <var title="">cache
- group</var>. Set its <span
- title="concept-appcache-completeness">completeness flag</span> to
- <i>incomplete</i>.</p></li>
+ <li><p>Let <var title="">new cache</var> be a newly created <span>application cache</span> in
+ <var title="">cache group</var>. Set its <span title="concept-appcache-completeness">completeness
+ flag</span> to <i>incomplete</i>.</p></li>
<li><p>For each entry in <var title="">cache group</var>'s <span
- title="concept-appcache-pending-masters">list of pending master
- entries</span>, associate the <code>Document</code> for this entry
- with <var title="">new cache</var>.</p></li>
+ title="concept-appcache-pending-masters">list of pending master entries</span>, associate the
+ <code>Document</code> for this entry with <var title="">new cache</var>.</p></li>
- <li><p>Set the <span title="concept-appcache-status">status</span>
- of <var title="">cache group</var> to <i>downloading</i>.</p></li>
+ <li><p>Set the <span title="concept-appcache-status">status</span> of <var title="">cache
+ group</var> to <i>downloading</i>.</p></li>
- <li><p>For each <span>cache host</span> associated with an
- <span>application cache</span> in <var title="">cache group</var>,
- <span>queue a post-load task</span> to <span>fire a simple
- event</span> that is cancelable named <code
- title="event-appcache-downloading">downloading</code> at the
- <code>ApplicationCache</code> singleton of the <span>cache
- host</span>. The default action of these events must be, if the
- user agent <span>shows caching progress</span>, the display of some
- sort of user interface indicating to the user that a new version is
- being downloaded.</p></li>
+ <li><p>For each <span>cache host</span> associated with an <span>application cache</span> in <var
+ title="">cache group</var>, <span>queue a post-load task</span> to <span>fire a simple
+ event</span> that is cancelable named <code title="event-appcache-downloading">downloading</code>
+ at the <code>ApplicationCache</code> singleton of the <span>cache host</span>. The default action
+ of these events must be, if the user agent <span>shows caching progress</span>, the display of
+ some sort of user interface indicating to the user that a new version is being
+ downloaded.</p></li>
- <li><p>Let <var title="">file list</var> be an empty list of
- URLs with flags.</p></li>
+ <li><p>Let <var title="">file list</var> be an empty list of URLs with flags.</p></li>
- <li><p>Add all the URLs in the list of <span
- title="concept-appcache-explicit">explicit entries</span> obtained
- by parsing <var title="">manifest</var> to <var title="">file
- list</var>, each flagged with "explicit entry".</p></li>
+ <li><p>Add all the URLs in the list of <span title="concept-appcache-explicit">explicit
+ entries</span> obtained by parsing <var title="">manifest</var> to <var title="">file list</var>,
+ each flagged with "explicit entry".</p></li>
- <li><p>Add all the URLs in the list of <span
- title="concept-appcache-fallback">fallback entries</span> obtained
- by parsing <var title="">manifest</var> to <var title="">file
- list</var>, each flagged with "fallback entry".</p></li>
+ <li><p>Add all the URLs in the list of <span title="concept-appcache-fallback">fallback
+ entries</span> obtained by parsing <var title="">manifest</var> to <var title="">file list</var>,
+ each flagged with "fallback entry".</p></li>
- <li><p>If this is an <span title="concept-appcache-upgrade">upgrade
- attempt</span>, then add all the URLs of <span
- title="concept-appcache-master">master entries</span> in the <span
- title="concept-appcache-newer">newest</span> <span>application
- cache</span> in <var title="">cache group</var> whose <span
- title="concept-appcache-completeness">completeness flag</span> is
- <i>complete</i> to <var title="">file list</var>, each flagged with
- "master entry".</p></li>
+ <li><p>If this is an <span title="concept-appcache-upgrade">upgrade attempt</span>, then add all
+ the URLs of <span title="concept-appcache-master">master entries</span> in the <span
+ title="concept-appcache-newer">newest</span> <span>application cache</span> in <var
+ title="">cache group</var> whose <span title="concept-appcache-completeness">completeness
+ flag</span> is <i>complete</i> to <var title="">file list</var>, each flagged with "master
+ entry".</p></li>
- <li><p>If any URL is in <var title="">file list</var> more than
- once, then merge the entries into one entry for that URL, that
- entry having all the flags that the original entries had.</p></li>
+ <li><p>If any URL is in <var title="">file list</var> more than once, then merge the entries into
+ one entry for that URL, that entry having all the flags that the original entries had.</p></li>
<li>
- <p>For each URL in <var title="">file list</var>, run the
- following steps. These steps may be run in parallel for two or
- more of the URLs at a time. If, while running these steps, the
- <code>ApplicationCache</code> object's <code
- title="dom-appcache-abort">abort()</code> method <span title="send
- a signal">sends a signal</span> to this instance of the
- <span>application cache download process</span> algorithm, then
- run the <span>cache failure steps</span> instead.</p>
+ <p>For each URL in <var title="">file list</var>, run the following steps. These steps may be
+ run in parallel for two or more of the URLs at a time. If, while running these steps, the
+ <code>ApplicationCache</code> object's <code title="dom-appcache-abort">abort()</code> method
+ <span title="send a signal">sends a signal</span> to this instance of the <span>application
+ cache download process</span> algorithm, then run the <span>cache failure steps</span>
+ instead.</p>
<ol>
<li>
- <p>If the resource URL being processed was flagged as neither an
- "explicit entry" nor or a "fallback entry", then the user agent
- may skip this URL.</p>
+ <p>If the resource URL being processed was flagged as neither an "explicit entry" nor or a
+ "fallback entry", then the user agent may skip this URL.</p>
- <p class="note">This is intended to allow user agents to expire
- resources not listed in the manifest from the cache. Generally,
- implementors are urged to use an approach that expires
+ <p class="note">This is intended to allow user agents to expire resources not listed in the
+ manifest from the cache. Generally, implementors are urged to use an approach that expires
lesser-used resources first.</p>
</li>
@@ -83568,66 +83464,53 @@
<var title="">file list</var> that have been either downloaded or skipped so far. The default
action of these events must be, if the user agent <span>shows caching progress</span>, the
display of some sort of user interface indicating to the user that a file is being downloaded
- in preparation for updating the application. <a href="#refsPROGRESS">[PROGRESS]</a></p></li>
+ in preparation for updating the application. <a href="#refsXHR">[XHR]</a></p></li>
<li>
- <p><span>Fetch</span><!--FETCH--> the resource, from the
- <span>origin</span> of the <span>URL</span> <var
- title="">manifest URL</var>, with the <i>synchronous flag</i>
- set and the <i>manual redirect flag</i> set. If this is an <span
- title="concept-appcache-upgrade">upgrade attempt</span>, then
- use the <span title="concept-appcache-newer">newest</span>
- <span>application cache</span> in <var title="">cache
- group</var> as an HTTP cache, and honor HTTP caching semantics
- (such as expiration, ETags, and so forth) with respect to that
- cache. User agents may also have other caches in place that are
- also honored.</p> <!-- not http-origin privacy sensitive -->
+ <p><span>Fetch</span><!--FETCH--> the resource, from the <span>origin</span> of the
+ <span>URL</span> <var title="">manifest URL</var>, with the <i>synchronous flag</i> set and
+ the <i>manual redirect flag</i> set. If this is an <span
+ title="concept-appcache-upgrade">upgrade attempt</span>, then use the <span
+ title="concept-appcache-newer">newest</span> <span>application cache</span> in <var
+ title="">cache group</var> as an HTTP cache, and honor HTTP caching semantics (such as
+ expiration, ETags, and so forth) with respect to that cache. User agents may also have other
+ caches in place that are also honored.</p> <!-- not http-origin privacy sensitive -->
- <p class="note">If the resource in question is already being
- downloaded for other reasons then the existing download process
- can sometimes be used for the purposes of this step, as defined
+ <p class="note">If the resource in question is already being downloaded for other reasons then
+ the existing download process can sometimes be used for the purposes of this step, as defined
by the <span title="fetch">fetching</span> algorithm.</p>
- <p class="example">An example of a resource that might already
- be being downloaded is a large image on a Web page that is being
- seen for the first time. The image would get downloaded to
- satisfy the <code>img</code> element on the page, as well as
- being listed in the cache manifest. According to the rules for
- <span title="fetch">fetching</span> that image only need be
- downloaded once, and it can be used both for the cache and for
- the rendered Web page.</p>
+ <p class="example">An example of a resource that might already be being downloaded is a large
+ image on a Web page that is being seen for the first time. The image would get downloaded to
+ satisfy the <code>img</code> element on the page, as well as being listed in the cache
+ manifest. According to the rules for <span title="fetch">fetching</span> that image only need
+ be downloaded once, and it can be used both for the cache and for the rendered Web page.</p>
</li>
<li>
- <p>If the previous step fails (e.g. the server returns a 4xx or
- 5xx response <span title="concept-http-equivalent-codes">or
- equivalent</span>, or there is a DNS error, or the connection
- times out, or the user cancels the download), or if the server
- returned a redirect, or if the resource is labeled with the
- "no-store" cache directive, then run the first appropriate step
- from the following list: <a href="#refsHTTP">[HTTP]</a></p>
+ <p>If the previous step fails (e.g. the server returns a 4xx or 5xx response <span
+ title="concept-http-equivalent-codes">or equivalent</span>, or there is a DNS error, or the
+ connection times out, or the user cancels the download), or if the server returned a redirect,
+ or if the resource is labeled with the "no-store" cache directive, then run the first
+ appropriate step from the following list: <a href="#refsHTTP">[HTTP]</a></p>
<dl class="switch">
- <dt>If the URL being processed was flagged as an "explicit
- entry" or a "fallback entry"</dt>
+ <dt>If the URL being processed was flagged as an "explicit entry" or a "fallback entry"</dt>
<dd>
- <p>If these steps are being run in parallel for any other URLs
- in <var title="">file list</var>, then abort these steps for
- those other URLs. Run the <span>cache failure
+ <p>If these steps are being run in parallel for any other URLs in <var title="">file
+ list</var>, then abort these steps for those other URLs. 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
+ <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>
@@ -83635,8 +83518,7 @@
<dt>If the error was a 404 or 410 HTTP response <span
title="concept-http-equivalent-codes">or equivalent</span></dt>
- <dt>If the resource was labeled with the "no-store" cache
- directive</dt>
+ <dt>If the resource was labeled with the "no-store" cache directive</dt>
<dd>
@@ -83649,67 +83531,56 @@
<dd>
<p>Copy the resource and its metadata from the <span
- title="concept-appcache-newer">newest</span> <span>application
- cache</span> in <var title="">cache group</var> whose <span
- title="concept-appcache-completeness">completeness flag</span>
- is <i>complete</i>, and act as if that was the fetched
- resource, ignoring the resource obtained from the network.</p>
+ title="concept-appcache-newer">newest</span> <span>application cache</span> in <var
+ title="">cache group</var> whose <span title="concept-appcache-completeness">completeness
+ flag</span> is <i>complete</i>, and act as if that was the fetched resource, ignoring 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>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.</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.</p>
- <p class="note">Except for the "no-store" directive, HTTP
- caching rules that would cause a file to be expired or otherwise
- not cached are ignored for the purposes of the <span>application
- cache download process</span>.</p>
+ <p class="note">Except for the "no-store" directive, HTTP caching rules that would cause a
+ file to be expired or otherwise not cached are ignored for the purposes of the
+ <span>application cache download process</span>.</p>
</li>
<li>
- <p>Otherwise, the fetching succeeded. Store the resource in
- the <var title="">new cache</var>.</p>
+ <p>Otherwise, the fetching succeeded. Store the resource in the <var title="">new
+ cache</var>.</p>
- <p>If the user agent is not able to store the resource (e.g.
- because of quota restrictions), the user agent may prompt the
- user or try to resolve the problem in some other manner (e.g.
- automatically pruning content in other caches). If the problem
- cannot be resolved, the user agent must run the <span>cache
- failure steps</span>.</p>
+ <p>If the user agent is not able to store the resource (e.g. because of quota restrictions),
+ the user agent may prompt the user or try to resolve the problem in some other manner (e.g.
+ automatically pruning content in other caches). If the problem cannot be resolved, the user
+ agent must run the <span>cache failure steps</span>.</p>
</li>
- <li><p>If the URL being processed was flagged as an "explicit
- entry" in <var title="">file list</var>, then categorize the
- entry as an <span title="concept-appcache-explicit">explicit
+ <li><p>If the URL being processed was flagged as an "explicit entry" in <var title="">file
+ list</var>, then categorize the entry as an <span title="concept-appcache-explicit">explicit
entry</span>.</p></li>
- <li><p>If the URL being processed was flagged as a "fallback
- entry" in <var title="">file list</var>, then categorize the
- entry as a <span title="concept-appcache-fallback">fallback
+ <li><p>If the URL being processed was flagged as a "fallback entry" in <var title="">file
+ list</var>, then categorize the entry as a <span title="concept-appcache-fallback">fallback
entry</span>.</p></li>
- <li><p>If the URL being processed was flagged as an "master
- entry" in <var title="">file list</var>, then categorize the
- entry as a <span title="concept-appcache-master">master
+ <li><p>If the URL being processed was flagged as an "master entry" in <var title="">file
+ list</var>, then categorize the entry as a <span title="concept-appcache-master">master
entry</span>.</p></li>
- <li><p>As an optimization, if the resource is an HTML or XML file
- whose root element is an <code>html</code> element with a <code
- title="attr-html-manifest">manifest</code> attribute whose value
- doesn't match the manifest URL of the application cache being
- processed, then the user agent should mark the entry as being
- <span title="concept-appcache-foreign">foreign</span>.</p>
+ <li><p>As an optimization, if the resource is an HTML or XML file whose root element is an
+ <code>html</code> element with a <code title="attr-html-manifest">manifest</code> attribute
+ whose value doesn't match the manifest URL of the application cache being processed, then the
+ user agent should mark the entry as being <span
+ title="concept-appcache-foreign">foreign</span>.</p>
</ol>
@@ -83726,178 +83597,144 @@
title="dom-ProgressEvents-loaded">loaded</code> attributes must be set to the number of files in
<var title="">file list</var>. The default action of these events must be, if the user agent
<span>shows caching progress</span>, the display of some sort of user interface indicating to the
- user that all the files have been downloaded. <a href="#refsPROGRESS">[PROGRESS]</a></p></li>
+ user that all the files have been downloaded. <a href="#refsXHR">[XHR]</a></p></li>
- <li><p>Store the list of <span
- title="concept-appcache-fallback-ns">fallback namespaces</span>,
- and the URLs of the <span
- title="concept-appcache-fallback">fallback entries</span> that they
- map to, in <var title="">new cache</var>.</p></li>
+ <li><p>Store the list of <span title="concept-appcache-fallback-ns">fallback namespaces</span>,
+ and the URLs of the <span title="concept-appcache-fallback">fallback entries</span> that they map
+ to, in <var title="">new cache</var>.</p></li>
- <li><p>Store the URLs that form the new <span
- title="concept-appcache-onlinewhitelist">online whitelist</span> in
- <var title="">new cache</var>.</p></li>
+ <li><p>Store the URLs that form the new <span 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>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>Store the value of the new <span
- title="concept-appcache-mode">cache mode flag</span> in <var
- title="">new cache</var>.</p></li>
+ <li><p>Store the value of the new <span title="concept-appcache-mode">cache mode flag</span> in
+ <var title="">new cache</var>.</p></li>
<li>
<p>For each entry in <var title="">cache group</var>'s <span
- title="concept-appcache-pending-masters">list of pending master
- entries</span>, wait for the resource for this entry to have
- either completely downloaded or failed.</p>
+ title="concept-appcache-pending-masters">list of pending master entries</span>, wait for the
+ resource for this entry to have either completely downloaded or failed.</p>
- <p>If the download failed (e.g. the server returns a 4xx or 5xx
- response <span title="concept-http-equivalent-codes">or
- equivalent</span>, or there is a DNS error, the connection times
- out, or the user cancels the download), or if the resource is
- labeled with the "no-store" cache directive, then run these
- substeps:</p>
+ <p>If the download failed (e.g. the server returns a 4xx or 5xx response <span
+ title="concept-http-equivalent-codes">or equivalent</span>, or there is a DNS error, the
+ connection times out, or the user cancels the download), or if the resource is labeled with the
+ "no-store" cache directive, then run these substeps:</p>
<ol>
- <li><p>Unassociate the <code>Document</code> for this entry from
- <var title="">new cache</var>.</p></li>
+ <li><p>Unassociate the <code>Document</code> for this entry from <var title="">new
+ cache</var>.</p></li>
- <li><p><span>Queue a post-load task</span> to <span>fire a simple
- event</span> that is cancelable named <code
- title="event-appcache-error">error</code> at the
- <code>ApplicationCache</code> singleton of the
- <code>Document</code> for this entry, if there still is one. The
- default action of this event must be, if the user agent
- <span>shows caching progress</span>, the display of some sort of
- user interface indicating to the user that the user agent failed
- to save the application for offline use.</p>
+ <li><p><span>Queue a post-load task</span> to <span>fire a simple event</span> that is
+ cancelable named <code title="event-appcache-error">error</code> at the
+ <code>ApplicationCache</code> singleton of the <code>Document</code> for this entry, if there
+ still is one. The default action of this event must be, if the user agent <span>shows caching
+ progress</span>, the display of some sort of user interface indicating to the user that the
+ user agent failed to save the application for offline use.</p>
<li>
- <p>If this is a <span title="concept-appcache-cache">cache
- attempt</span> and this entry is the last entry in <var
- title="">cache group</var>'s <span
- title="concept-appcache-pending-masters">list of pending master
- entries</span>, then run these further substeps:</p>
+ <p>If this is a <span title="concept-appcache-cache">cache attempt</span> and this entry is
+ the last entry in <var title="">cache group</var>'s <span
+ title="concept-appcache-pending-masters">list of pending master entries</span>, then run these
+ further substeps:</p>
<ol>
- <li><p>Discard <var title="">cache group</var> and its only
- <span>application cache</span>, <var title="">new
- cache</var>.</p>
+ <li><p>Discard <var title="">cache group</var> and its only <span>application cache</span>,
+ <var title="">new cache</var>.</p>
- <li><p>If appropriate, remove any user interface indicating
- that an update for this cache is in progress.</p></li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is
+ in progress.</p></li>
- <li><p>Abort the <span>application cache download
- process</span>.</p></li>
+ <li><p>Abort the <span>application cache download process</span>.</p></li>
</ol>
</li>
- <li><p>Otherwise, remove this entry from <var title="">cache
- group</var>'s <span title="concept-appcache-pending-masters">list
- of pending master entries</span>.</p></li>
+ <li><p>Otherwise, remove this entry from <var title="">cache group</var>'s <span
+ title="concept-appcache-pending-masters">list of pending master entries</span>.</p></li>
</ol>
- <p>Otherwise, store the resource for this entry in <var
- title="">new cache</var>, if it isn't already there, and
- categorize its entry as a <span
- title="concept-appcache-master">master entry</span>.</p>
+ <p>Otherwise, store the resource for this entry in <var title="">new cache</var>, if it isn't
+ already there, and categorize its entry as a <span title="concept-appcache-master">master
+ entry</span>.</p>
</li>
<li>
- <p><span>Fetch</span><!--FETCH--> the resource from <var
- title="">manifest URL</var> again, with the <i>synchronous
- flag</i> set, and let <var title="">second manifest</var> be that
- resource. HTTP caching semantics should again be honored for this
- request.</p> <!-- http-origin privacy sensitive, though it doesn't
- matter, since this can never be cross-origin -->
+ <p><span>Fetch</span><!--FETCH--> the resource from <var title="">manifest URL</var> again, with
+ the <i>synchronous flag</i> set, and let <var title="">second manifest</var> be that resource.
+ HTTP caching semantics should again be honored for this request.</p> <!-- http-origin privacy
+ sensitive, though it doesn't matter, since this can never be cross-origin -->
- <p class="note">Since caching can be honored, authors are
- encouraged to avoid setting the cache headers on the manifest in
- such a way that the user agent would simply not contact the
- network for this second request; otherwise, the user agent would
- not notice if the cache had changed during the cache update
- process.</p>
+ <p class="note">Since caching can be honored, authors are encouraged to avoid setting the cache
+ headers on the manifest in such a way that the user agent would simply not contact the network
+ for this second request; otherwise, the user agent would not notice if the cache had changed
+ during the cache update process.</p>
</li>
<li>
- <p>If the previous step failed for any reason, or if the fetching
- attempt involved a redirect, or if <var title="">second
- manifest</var> and <var title="">manifest</var> are not
- byte-for-byte identical, then schedule a rerun of the entire
- algorithm with the same parameters after a short delay, and run
- the <span>cache failure steps</span>.</p>
+ <p>If the previous step failed for any reason, or if the fetching attempt involved a redirect,
+ or if <var title="">second manifest</var> and <var title="">manifest</var> are not byte-for-byte
+ identical, then schedule a rerun of the entire algorithm with the same parameters after a short
+ delay, and run the <span>cache failure steps</span>.</p>
</li>
<li>
- <p>Otherwise, store <var title="">manifest</var> in <var
- title="">new cache</var>, if it's not there already, and
- categorize its entry as <span
- title="concept-appcache-manifest">the manifest</span>.</p>
+ <p>Otherwise, store <var title="">manifest</var> in <var title="">new cache</var>, if it's not
+ there already, and categorize its entry as <span title="concept-appcache-manifest">the
+ manifest</span>.</p>
</li>
- <li><p>Set the <span
- title="concept-appcache-completeness">completeness flag</span> of
- <var title="">new cache</var> to <i>complete</i>.</p></li>
+ <li><p>Set the <span title="concept-appcache-completeness">completeness flag</span> of <var
+ title="">new cache</var> to <i>complete</i>.</p></li>
<li><p>Let <var title="">task list</var> be an empty list of <span
title="concept-task">tasks</span>.</p>
<li>
- <p>If this is a <span title="concept-appcache-cache">cache
- attempt</span>, then for each <span>cache host</span> associated
- with an <span>application cache</span> in <var title="">cache
- group</var>, create a <span title="concept-task">task</span> to
- <span>fire a simple event</span> that is cancelable named <code
- title="event-appcache-cached">cached</code> at the
- <code>ApplicationCache</code> singleton of the <span>cache
- host</span>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <span>shows caching progress</span>, the display of some sort of
- user interface indicating to the user that the application has
- been cached and that they can now use it offline.</p>
+ <p>If this is a <span title="concept-appcache-cache">cache attempt</span>, then for each
+ <span>cache host</span> associated with an <span>application cache</span> in <var title="">cache
+ group</var>, create a <span title="concept-task">task</span> to <span>fire a simple event</span>
+ that is cancelable named <code title="event-appcache-cached">cached</code> at the
+ <code>ApplicationCache</code> singleton of the <span>cache host</span>, and append it to <var
+ title="">task list</var>. The default action of these events must be, if the user agent
+ <span>shows caching progress</span>, the display of some sort of user interface indicating to
+ the user that the application has been cached and that they can now use it offline.</p>
- <p>Otherwise, it is an <span
- title="concept-appcache-upgrade">upgrade attempt</span>. For each
- <span>cache host</span> associated with an <span>application
- cache</span> in <var title="">cache group</var>, create a <span
- title="concept-task">task</span> to <span>fire a simple
- event</span> that is cancelable named <code
- title="event-appcache-updateready">updateready</code> at the
- <code>ApplicationCache</code> singleton of the <span>cache
- host</span>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <span>shows caching progress</span>, the display of some sort of
- user interface indicating to the user that a new version is
- available and that they can activate it by reloading the page.</p>
+ <p>Otherwise, it is an <span title="concept-appcache-upgrade">upgrade attempt</span>. For each
+ <span>cache host</span> associated with an <span>application cache</span> in <var title="">cache
+ group</var>, create a <span title="concept-task">task</span> to <span>fire a simple event</span>
+ that is cancelable named <code title="event-appcache-updateready">updateready</code> at the
+ <code>ApplicationCache</code> singleton of the <span>cache host</span>, and append it to <var
+ title="">task list</var>. The default action of these events must be, if the user agent
+ <span>shows caching progress</span>, the display of some sort of user interface indicating to
+ the user that a new version is available and that they can activate it by reloading the
+ page.</p>
</li>
- <li><p>If appropriate, remove any user interface indicating that
- an update for this cache is in progress.</p></li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</p></li>
- <li><p>Set the <span title="concept-appcache-status">update
- status</span> of <var title="">cache group</var> to
- <i>idle</i>.</p></li>
+ <li><p>Set the <span title="concept-appcache-status">update status</span> of <var title="">cache
+ group</var> to <i>idle</i>.</p></li>
- <li><p>For each <span title="concept-task">task</span> in <var
- title="">task list</var>, <span title="queue a post-load
- task">queue that task as a post-load task</span>.</p></li>
+ <li><p>For each <span title="concept-task">task</span> in <var title="">task list</var>, <span
+ title="queue a post-load task">queue that task as a post-load task</span>.</p></li>
</ol>
@@ -83911,121 +83748,99 @@
<li>
<p>For each entry in <var title="">cache group</var>'s <span
- title="concept-appcache-pending-masters">list of pending master
- entries</span>, run the following further substeps. These steps
- may be run in parallel for two or more entries at a time.</p>
+ title="concept-appcache-pending-masters">list of pending master entries</span>, run the
+ following further substeps. These steps may be run in parallel for two or more entries at a
+ time.</p>
<ol>
- <li><p>Wait for the resource for this entry to have either
- completely downloaded or failed.</p>
+ <li><p>Wait for the resource for this entry to have either completely downloaded or failed.</p>
- <li><p>Unassociate the <code>Document</code> for this entry from
- its <span>application cache</span>, if it has one.</p></li>
+ <li><p>Unassociate the <code>Document</code> for this entry from its <span>application
+ cache</span>, if it has one.</p></li>
- <li><p>Create a <span title="concept-task">task</span> to
- <span>fire a simple event</span> that is cancelable named <code
- title="event-appcache-error">error</code> at the
- <code>ApplicationCache</code> singleton of the
- <code>Document</code> for this entry, if there still is one, and
- append it to <var title="">task list</var>. The default action of
- these events must be, if the user agent <span>shows caching
- progress</span>, the display of some sort of user interface
- indicating to the user that the user agent failed to save the
- application for offline use.</p>
+ <li><p>Create a <span title="concept-task">task</span> to <span>fire a simple event</span> that
+ is cancelable named <code title="event-appcache-error">error</code> at the
+ <code>ApplicationCache</code> singleton of the <code>Document</code> for this entry, if there
+ still is one, and append it to <var title="">task list</var>. The default action of these
+ events must be, if the user agent <span>shows caching progress</span>, the display of some sort
+ of user interface indicating to the user that the user agent failed to save the application for
+ offline use.</p>
</ol>
</li>
- <li><p>For each <span>cache host</span> still associated with an
- <span>application cache</span> in <var title="">cache group</var>,
- create a <span title="concept-task">task</span> to <span>fire a
- simple event</span> that is cancelable named <code
- title="event-appcache-error">error</code> at the
- <code>ApplicationCache</code> singleton of the <span>cache
- host</span>, and append it to <var title="">task list</var>. The
- default action of these events must be, if the user agent
- <span>shows caching progress</span>, the display of some sort of
- user interface indicating to the user that the user agent failed to
- save the application for offline use.</p></li>
+ <li><p>For each <span>cache host</span> still associated with an <span>application cache</span>
+ in <var title="">cache group</var>, create a <span title="concept-task">task</span> to <span>fire
+ a simple event</span> that is cancelable named <code title="event-appcache-error">error</code> at
+ the <code>ApplicationCache</code> singleton of the <span>cache host</span>, and append it to <var
+ title="">task list</var>. The default action of these events must be, if the user agent
+ <span>shows caching progress</span>, the display of some sort of user interface indicating to the
+ user that the user agent failed to save the application for offline use.</p></li>
<li><p>Empty <var title="">cache group</var>'s <span
- title="concept-appcache-pending-masters">list of pending master
- entries</span>.</p></li>
+ title="concept-appcache-pending-masters">list of pending master entries</span>.</p></li>
- <li><p>If <var title="">cache group</var> has an <span>application
- cache</span> whose <span
- title="concept-appcache-completeness">completeness flag</span> is
- <i>incomplete</i>, then discard that <span>application
- cache</span>.</p>
+ <li><p>If <var title="">cache group</var> has an <span>application cache</span> whose <span
+ title="concept-appcache-completeness">completeness flag</span> is <i>incomplete</i>, then discard
+ that <span>application cache</span>.</p>
- <li><p>If appropriate, remove any user interface indicating that an
- update for this cache is in progress.</p></li>
+ <li><p>If appropriate, remove any user interface indicating that an update for this cache is in
+ progress.</p></li>
- <li><p>Let the <span title="concept-appcache-status">status</span>
- of <var title="">cache group</var> be <i>idle</i>.</p></li>
+ <li><p>Let the <span title="concept-appcache-status">status</span> of <var title="">cache
+ group</var> be <i>idle</i>.</p></li>
- <li><p>If this was a <span title="concept-appcache-cache">cache
- attempt</span>, discard <var title="">cache group</var>
- altogether.</p>
+ <li><p>If this was a <span title="concept-appcache-cache">cache attempt</span>, discard <var
+ title="">cache group</var> altogether.</p>
- <li><p>For each <span title="concept-task">task</span> in <var
- title="">task list</var>, <span title="queue a post-load
- task">queue that task as a post-load task</span>.</p></li>
+ <li><p>For each <span title="concept-task">task</span> in <var title="">task list</var>, <span
+ title="queue a post-load task">queue that task as a post-load task</span>.</p></li>
- <li><p>Abort the <span>application cache download
- process</span>.</p></li>
+ <li><p>Abort the <span>application cache download process</span>.</p></li>
</ol>
- <p>Attempts to <span>fetch</span> resources as part of the
- <span>application cache download process</span> may be done with
- cache-defeating semantics, to avoid problems with stale or
+ <p>Attempts to <span>fetch</span> resources as part of the <span>application cache download
+ process</span> may be done with cache-defeating semantics, to avoid problems with stale or
inconsistent intermediary caches.</p>
<hr>
- <p>User agents may invoke the <span>application cache download
- process</span>, in the background, for any <span>application cache
- group</span>, at any time (with no <span>cache host</span>). This
- allows user agents to keep caches primed and to update caches even
- before the user visits a site.</p>
+ <p>User agents may invoke the <span>application cache download process</span>, in the background,
+ for any <span>application cache group</span>, at any time (with no <span>cache host</span>). This
+ allows user agents to keep caches primed and to update caches even before the user visits a
+ site.</p>
<hr>
- <p>Each <code>Document</code> has a list of <dfn>pending application
- cache download process tasks</dfn> that is used to delay events
- fired by the algorithm above until the document's <code
- title="event-load">load</code> event has fired. When the
- <code>Document</code> is created, the list must be empty.</p>
+ <p>Each <code>Document</code> has a list of <dfn>pending application cache download process
+ tasks</dfn> that is used to delay events fired by the algorithm above until the document's <code
+ title="event-load">load</code> event has fired. When the <code>Document</code> is created, the
+ list must be empty.</p>
- <p>When the steps above say to <dfn>queue a post-load task</dfn>
- <var title="">task</var>, where <var title="">task</var> is a <span
- title="concept-task">task</span> that dispatches an event on a
- target <code>ApplicationCache</code> object <var
- title="">target</var>, the user agent must run the appropriate steps
- from the following list:</p>
+ <p>When the steps above say to <dfn>queue a post-load task</dfn> <var title="">task</var>, where
+ <var title="">task</var> is a <span title="concept-task">task</span> that dispatches an event on a
+ target <code>ApplicationCache</code> object <var title="">target</var>, the user agent must run
+ the appropriate steps from the following list:</p>
<dl>
<dt>If <var title="">target</var>'s <code>Document</code> is
<span>ready for post-load tasks</span></dt>
- <dd><p><span title="queue a task">Queue</span> the task <var
- title="">task</var>.</p></dd>
+ <dd><p><span title="queue a task">Queue</span> the task <var title="">task</var>.</p></dd>
<dt>Otherwise</dt>
- <dd><p>Add <var title="">task</var> to <var title="">target</var>'s
- <code>Document</code>'s list of <span>pending application cache
- download process tasks</span>.</p></dd>
+ <dd><p>Add <var title="">task</var> to <var title="">target</var>'s <code>Document</code>'s list
+ of <span>pending application cache download process tasks</span>.</p></dd>
</dl>
- <p>The <span>task source</span> for these <span
- title="concept-task">tasks</span> is the <span>networking task
- source</span>.</p>
+ <p>The <span>task source</span> for these <span title="concept-task">tasks</span> is the
+ <span>networking task source</span>.</p>
@@ -121469,7 +121284,7 @@
<dd><cite><a href="http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extensions">Microformats Wiki: existing rel values</a></cite>. Microformats.</dd>
<dt id="refsMIMESNIFF">[MIMESNIFF]</dt>
- <dd><cite><a href="http://mimesniff.spec.whatwg.org/">MIME Sniffing</a></cite>, A. Barth, I. Hickson. WHATWG.</dd>
+ <dd><cite><a href="http://mimesniff.spec.whatwg.org/">MIME Sniffing</a></cite>, G. Hemsley. WHATWG.</dd>
<dt id="refsMNG">[MNG]</dt>
<dd><cite><a href="http://www.libpng.org/pub/mng/spec/">MNG (Multiple-image Network Graphics) Format</a></cite>. G. Randers-Pehrson.</dd>
@@ -121537,9 +121352,6 @@
<dt id="refsPPUTF8">[PPUTF8]</dt>
<dd>(Non-normative) <cite><a href="http://www.sw.it.aoyama.ac.jp/2012/pub/IUC11-UTF-8.pdf">The Properties and Promises <!-- Promizes (sic) --> of UTF-8</a></cite>, M. Dürst. University of Zürich. In <cite>Proceedings of the 11th International Unicode Conference</cite>.</dd>
- <dt id="refsPROGRESS">[PROGRESS]</dt>
- <dd><cite><a href="http://dev.w3.org/2006/webapi/progress/">Progress Events</a></cite>, A. van Kesteren. W3C.</dd>
-
<dt id="refsPSL">[PSL]</dt>
<dd><cite><a href="http://publicsuffix.org/">Public Suffix List</a></cite>.
Mozilla Foundation.</dd>
More information about the Commit-Watchers
mailing list