Browse files

[gwr] (2) Remove opportunistic caching; leave only the fallback feature.

git-svn-id: http://svn.whatwg.org/webapps@2338 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 10f664f commit 556b6eb8ca91567b4c00d85074fa55d03ed212a6 @Hixie Hixie committed Oct 16, 2008
Showing with 188 additions and 301 deletions.
  1. +88 −141 index
  2. +100 −160 source
View
229 index
@@ -16,7 +16,7 @@
<div class=head>
<p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<h1>HTML 5</h1>
- <h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 15 October 2008</h2>
+ <h2 class="no-num no-toc" id=draft-recommendation-&mdash;-date:-01-jan-1901>Draft Recommendation &mdash; 16 October 2008</h2>
<p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<dl><dt>Multiple-page version:</dt>
@@ -31805,8 +31805,7 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
URL</a>, then return a new globally unique
identifier.</li>
- <li><p>Let <var title="">scheme</var> be the <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a> component of the URI,
- <a href=#converted-to-lowercase>converted to lowercase</a>.</li>
+ <li><p>Let <var title="">scheme</var> be the <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a> component of <var title="">url</var>, <a href=#converted-to-lowercase>converted to lowercase</a>.</li>
<li><p>If the UA doesn't support the protocol given by <var title="">scheme</var>, then return a new globally unique
identifier.</li>
@@ -33693,7 +33692,7 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
a document that uses that content type.</li>
<li>The user agent contacts the third party and hands the third
- party the URI to the Intranet content.</li>
+ party the URL to the Intranet content.</li>
</ol><p>No actual confidential file data is leaked in this manner, but
the URLs themselves could contain confidential information. For
@@ -33889,13 +33888,6 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
entries.
- <dt><dfn id=concept-appcache-oppcache title=concept-appcache-oppcache>Opportunistically cached entries</dfn>
-
- <dd>Resources whose URLs <a href=#concept-appcache-matches-oppcache title=concept-appcache-matches-oppcache>matched</a> an <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
- namespace</a> when they were fetched, and were therefore
- cached in the application cache.
-
-
<dt><dfn id=concept-appcache-dynamic title=concept-appcache-dynamic>Dynamic entries</dfn>
<dd>Resources that were added to the cache by the <code title=dom-appcache-add><a href=#dom-appcache-add>add()</a></code> method.
@@ -33907,14 +33899,13 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
</li>
- <li>Zero or more <dfn id=concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
- namespaces</dfn>: URLs, used as <a href=#concept-appcache-matches-oppcache title=concept-appcache-matches-oppcache>prefix match
+ <li>Zero or more <dfn id=concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback
+ namespaces</dfn>: URLs, used as <a href=#concept-appcache-matches-fallback title=concept-appcache-matches-fallback>prefix match
patterns</a>, each of which is mapped to a <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entry</a>. Each
- namespace URL prefix, when parsed as a URL, has the <a href=#same-origin>same
- origin</a> as <a href=#concept-appcache-manifest title=concept-appcache-manifest>the
- manifest</a>.</li>
+ namespace URL has the <a href=#same-origin>same origin</a> as <a href=#concept-appcache-manifest title=concept-appcache-manifest>the manifest</a>.</li>
- <li>Zero or more URLs that form the <dfn id=concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</dfn>.
+ <li>Zero or more URLs that form the <dfn id=concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist
+ namespaces</dfn>.
</ul><p>Multiple application caches can contain the same resource,
e.g. if their manifests all reference that resource. If the user
@@ -34064,30 +34055,24 @@ style/default.css</pre>
</dl><p>Manifests may contain sections more than once. Sections may be
empty.</p>
- <p>URLs that are to be fallback pages associated with <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
- namespaces</a>, and those namespaces themselves, must be given in
- fallback sections, with the namespace being the first URL of the
- data line, and the corresponding fallback page being the second
- URL. All the other pages to be cached must be listed in explicit
- sections.</p>
+ <p>URLs that are to be fallback pages associated with <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespaces</a>, and
+ those namespaces themselves, must be given in fallback sections,
+ with the namespace being the first URL of the data line, and the
+ corresponding fallback page being the second URL. All the other
+ pages to be cached must be listed in explicit sections.</p>
- <p><a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>Opportunistic caching
+ <p><a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>Fallback
namespaces</a> must have the <a href=#same-origin>same origin</a> as the
manifest itself.</p>
- <p>An opportunistic caching namespace must not be listed more than
- once.</p>
+ <p>A <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback
+ namespace</a> must not be listed more than once.</p>
<p>URLs that the user agent is to put into the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a>
must all be specified in online whitelist sections. (This is needed
for any URL that the page is intending to use to communicate back to
the server.)</p>
- <p>URLs in the online whitelist section must not also be listed in
- explicit section, and must not be listed as fallback entries in the
- fallback section. (URLs in the online whitelist section may match
- opportunistic caching namespaces, however.)</p>
-
<p>Relative URLs must be given relative to the manifest's own
URL.</p>
@@ -34114,8 +34099,8 @@ style/default.css</pre>
entries</a>.</li>
<li><p>Let <var title="">fallback URLs</var> be an initially empty
- mapping of <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic
- caching namespaces</a> to <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a>.</li>
+ mapping of <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback
+ namespaces</a> to <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a>.</li>
<li><p>Let <var title="">online whitelist URLs</var> be an
initially empty list of URLs for a <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
@@ -34276,15 +34261,13 @@ style/default.css</pre>
resulting <a href=#absolute-url title="absolute URL">absolute URLs</a>.</p>
<p>If the <a href=#absolute-url>absolute URL</a> corresponding to <var title="">part one</var> is already in the <var title="">fallback
- URIs</var> mapping as an <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
- namespace</a>, then jump back to the step labeled "start of
- line".</p>
+ URLs</var> mapping as a <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespace</a>,
+ then jump back to the step labeled "start of line".</p>
<p>Otherwise, add the <a href=#absolute-url>absolute URL</a> corresponding to
<var title="">part one</var> to the <var title="">fallback
- URIs</var> mapping as an <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
- namespace</a>, mapped to the <a href=#absolute-url>absolute URL</a>
- corresponding to <var title="">part two</var> as the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entry</a>.</p>
+ URLs</var> mapping as a <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespace</a>,
+ mapped to the <a href=#absolute-url>absolute URL</a> corresponding to <var title="">part two</var> as the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entry</a>.</p>
</dd>
@@ -34329,12 +34312,11 @@ style/default.css</pre>
<li><p>Return the <var title="">explicit URLs</var> list, the <var title="">fallback URLs</var> mapping, and the <var title="">online
whitelist URLs</var>.</li>
- </ol><p class=note>If a resource is listed in both the online whitelist
- and in the explicit section, then that resource will be fetched and
- cached, but when the page tries to use this resource, the user agent
- will ignore the cached copy and attempt to fetch the file from the
- network. Indeed, the cached copy will only be used if it is opened
- from a top-level browsing context.</p>
+ </ol><p class=note>If a resource is listed in the explicit section and
+ matches an entry in the online whitelist, or if a resource matches
+ both an entry in the fallback section and the online whitelist, the
+ resource will taken from the cache, and the online whitelist entry
+ will be ignored.</p>
<h4 id=updating-an-application-cache><span class=secno>5.7.4 </span>Updating an application cache</h4>
@@ -34405,9 +34387,8 @@ style/default.css</pre>
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-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic
- caching namespaces</a> that map to them, and entries for the
- <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
+ and the <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback
+ namespaces</a> that map to them, and entries for the <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
whitelist</a>.</p>
</li>
@@ -34480,13 +34461,6 @@ style/default.css</pre>
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-oppcache title=concept-appcache-oppcache>opportunistically cached
- entries</a> in <var title="">cache</var> that <a href=#concept-appcache-matches-oppcache title=concept-appcache-matches-oppcache>match</a> the <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
- namespaces</a> obtained by parsing <var title="">manifest</var>
- to <var title="">file list</var>, each flagged with "opportunistic
- 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-implicit title=concept-appcache-implicit>implicit entries</a> in <var title="">cache</var> to <var title="">file list</var>, each flagged
with "implicit entry".</li>
@@ -34554,11 +34528,6 @@ style/default.css</pre>
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 a "opportunistic
- entry" in <var title="">file list</var>, then categorize the
- entry as an <a href=#concept-appcache-oppcache title=concept-appcache-oppcache>opportunistically cached
- entry</a>.</li>
-
<li><p>If the URL being processed was flagged as an "implicit
entry" in <var title="">file list</var>, then categorize the
entry as a <a href=#concept-appcache-implicit title=concept-appcache-implicit>implicit
@@ -34575,8 +34544,8 @@ style/default.css</pre>
cache</var>, if it's not there already, and categorize this entry
(whether newly added or not) as <a href=#concept-appcache-manifest title=concept-appcache-manifest>the manifest</a>.</li>
- <li><p>Store the list of <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
- namespaces</a>, and the URLs of the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entries</a> that they
+ <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 the new cache.</li>
<li><p>Store the URLs that form the new <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online whitelist</a> in
@@ -34662,24 +34631,24 @@ style/default.css</pre>
Web applications is part of the <a href=#navigate title=navigate>navigation</a> model, but references the
algorithms defined in this section.</p>
- <p>A URL <dfn id=concept-appcache-matches-oppcache title=concept-appcache-matches-oppcache>matches an
- opportunistic caching namespace</dfn> if there exists an
- <a href=#application-cache>application cache</a> whose <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>'s URL has the
+ <p>A URL <dfn id=concept-appcache-matches-fallback title=concept-appcache-matches-fallback>matches a
+ fallback namespace</dfn> if there exists an <a href=#application-cache>application
+ cache</a> whose <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a>'s URL has the
<a href=#same-origin>same origin</a> as the URL in question, and if that
- application cache has an <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
- namespace</a> with a <a href=#url-path title=url-path>&lt;path&gt;</a>
- component that exactly matches the start of the <a href=#url-path title=url-path>&lt;path&gt;</a> component of the URL being
- examined. If multiple opportunistic caching namespaces match the
- same URL, the one with the longest &lt;path&gt; component is the one
- that matches. A URL looking for an opportunistic caching namespace
- can match more than one application cache at a time, but only
- matches one namespace in each cache.</p>
+ application cache has a <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespace</a> with
+ a <a href=#url-path title=url-path>&lt;path&gt;</a> component that is a
+ <a href=#prefix-match>prefix match</a> for the <a href=#url-path title=url-path>&lt;path&gt;</a> component of the URL being
+ examined. If multiple fallback namespaces match the same URL, the
+ one with the longest <a href=#url-path title=url-path>&lt;path&gt;</a> component is the one
+ that matches. A URL looking for an fallback namespace can match more
+ than one application cache at a time, but only matches one namespace
+ in each cache.</p>
<div class=example>
<p>If a manifest <code title="">http://example.com/app1/manifest</code> declares that
- <code title="">http://example.com/resources/images</code> should be
- opportunistically cached, and the user navigates to <code title="">http://example.com/resources/images/cat.png</code>, then
+ <code title="">http://example.com/resources/images</code> is a
+ fallback namespace, and the user navigates to <code title="">http://example.com/resources/images/cat.png</code>, then
the user agent will decide that the application cache identified by
<code title="">http://example.com/app1/manifest</code> contains a
namespace with a match for that URL.</p>
@@ -34822,37 +34791,34 @@ style/default.css</pre>
mechanism or equivalent, then <a href=#fetch>fetch</a> the resource
normally and abort these steps.</li>
- <li><p>If the resource's URL is <a href=#concept-appcache-implicit title=concept-appcache-implicit>an implicit entry</a>, <a href=#concept-appcache-manifest title=concept-appcache-manifest>the manifest</a>, <a href=#concept-appcache-explicit title=concept-appcache-explicit>an explicit entry</a>, <a href=#concept-appcache-fallback title=concept-appcache-fallback>a fallback entry</a>, <a href=#concept-appcache-oppcache title=concept-appcache-oppcache>an opportunistically cached
- entry</a>, or a <a href=#concept-appcache-dynamic title=concept-appcache-dynamic>dynamic
- entry</a> in the <a href=#application-cache>application cache</a>, then get the
- resource from the cache (instead of fetching it), and abort these
- steps.</li>
-
- <li><p>If there is an entry in the <a href=#application-cache>application cache</a>'s
- <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
- whitelist</a> that has the <a href=#same-origin>same origin</a> as the
- resource's URL and that is a <a href=#prefix-match>prefix match</a> for the
- resource's URL, then <a href=#fetch>fetch</a> the resource normally and
- abort these steps.</li>
+ <li><p>If the resource's URL is <a href=#concept-appcache-implicit title=concept-appcache-implicit>an implicit entry</a>, <a href=#concept-appcache-manifest title=concept-appcache-manifest>the manifest</a>, <a href=#concept-appcache-explicit title=concept-appcache-explicit>an explicit entry</a>, <a href=#concept-appcache-fallback title=concept-appcache-fallback>a fallback entry</a>, or a
+ <a href=#concept-appcache-dynamic title=concept-appcache-dynamic>dynamic entry</a> in the
+ <a href=#application-cache>application cache</a>, then get the resource from the
+ cache (instead of fetching it), and abort these steps.</li>
<li>
<p>If the resource's URL has the <a href=#same-origin>same origin</a> as the
- manifest's URL, and there is an <a href=#concept-appcache-oppcache-ns title=concept-appcache-oppcache-ns>opportunistic caching
- namespace</a> in the <a href=#application-cache>application cache</a> whose
- &lt;path&gt; component is a <a href=#prefix-match>prefix match</a> for the
- resource's URL's <a href=#url-path title=url-path>&lt;path&gt;</a>
- component, then:
+ manifest's URL, and there is a <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespace</a> in
+ the <a href=#application-cache>application cache</a> whose &lt;path&gt; component is
+ a <a href=#prefix-match>prefix match</a> for the resource's URL's <a href=#url-path title=url-path>&lt;path&gt;</a> component, then:</p>
<p><a href=#fetch>Fetch</a> the resource normally. If this results 4xx
or 5xx status codes or equivalent, or if there were network errors
(but not if the user canceled the download), then instead get,
from the cache, the resource of the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback entry</a>
- corresponding to the namespace with the longest matching
- &lt;path&gt; component. Abort these steps.</p>
+ corresponding to the namespace with the longest matching <a href=#url-path title=url-path>&lt;path&gt;</a> component. Abort these
+ steps.</p>
</li>
+ <li><p>If there is an entry in the <a href=#application-cache>application cache</a>'s
+ <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
+ whitelist</a> that has the <a href=#same-origin>same origin</a> as the
+ resource's URL and that is a <a href=#prefix-match>prefix match</a> for the
+ resource's URL, then <a href=#fetch>fetch</a> the resource normally and
+ abort these steps.</li>
+
<li><p>Fail the resource load.</li>
</ol><p class=note>The above algorithm ensures that resources that are
@@ -35710,54 +35676,35 @@ user reload must be equivalent to .reload()
<p>If the resource was not fetched from an <a href=#application-cache>application
cache</a>, and was to be fetched using HTTP GET or equivalent,
- and its URL <a href=#concept-appcache-matches-oppcache title=concept-appcache-matches-oppcache>matches the
- opportunistic caching namespace</a> of one or more application
- caches, and the user didn't cancel the navigation attempt during
- the previous step, then:</p>
-
- <dl class=switch><dt>If the browsing context being navigated is a <a href=#top-level-browsing-context>top-level
- browsing context</a>, and the navigation attempt failed
- (e.g. the server returned a 4xx or 5xx status code or equivalent,
- or there was a DNS error)</dt>
-
- <dd>
-
- <p>Let <var title="">candidate</var> be the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback resource</a>
- specified for the opportunistic caching namespace in
- question. If multiple application caches match, the user agent
- must use the fallback of the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application
- cache</a> of those that match.</p>
-
- <p>If <var title="">candidate</var> is not marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, then the user
- agent must discard the failed load and instead continue along
- these steps using <var title="">candidate</var> as the
- resource.</p>
-
- <p>For the purposes of session history (and features that depend
- on session history, e.g. bookmarking) the user agent must use
- the URL of the resource that was requested (the one that matched
- the opportunistic caching namespace), not the fallback
- resource. However, the user agent may indicate to the user that
- the original page load failed, that the page used was a fallback
- resource, and what the URL of the fallback resource actually
- is.</p>
-
- </dd>
-
- <dt>Otherwise</dt>
-
- <dd>
+ and its URL <a href=#concept-appcache-matches-fallback title=concept-appcache-matches-fallback>matches the fallback
+ namespace</a> of one or more application caches, and the user
+ didn't cancel the navigation attempt during the previous step, and
+ the browsing context being navigated is a <a href=#top-level-browsing-context>top-level browsing
+ context</a>, and the navigation attempt failed (e.g. the server
+ returned a 4xx or 5xx status code or equivalent, or there was a
+ DNS error), then:</p>
+
+ <p>Let <var title="">candidate</var> be the <a href=#concept-appcache-fallback title=concept-appcache-fallback>fallback resource</a>
+ specified for the <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback namespace</a> in
+ question. If multiple application caches match, the user agent
+ must use the fallback of the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application
+ cache</a> of those that match.</p>
- <p>Once the download is complete, if there were no errors and
- the user didn't cancel the request, the user agent must cache
- the resource in all the application caches that have a <a href=#concept-appcache-matches-oppcache title=concept-appcache-matches-oppcache>matching opportunistic
- caching namespace</a>, categorized as <a href=#concept-appcache-oppcache title=concept-appcache-oppcache>opportunistically cached
- entries</a>. Meanwhile, the user agent must continue along
- these steps.</p>
+ <p>If <var title="">candidate</var> is not marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, then the user
+ agent must discard the failed load and instead continue along
+ these steps using <var title="">candidate</var> as the
+ resource.</p>
- </dd>
+ <p>For the purposes of session history (and features that depend
+ on session history, e.g. bookmarking) the user agent must use the
+ URL of the resource that was requested (the one that matched the
+ <a href=#concept-appcache-fallback-ns title=concept-appcache-fallback-ns>fallback
+ namespace</a>), not the fallback resource. However, the user
+ agent may indicate to the user that the original page load failed,
+ that the page used was a fallback resource, and what the URL of
+ the fallback resource actually is.</p>
- </dl></li>
+ </li>
<li><p>If the document's out-of-band metadata (e.g. HTTP headers),
not counting any <a href=#content-type-0 title=Content-Type>type information</a>
@@ -41094,8 +41041,8 @@ XXX Once we resolve the style="" issue, address these:
must <a href=#resolve-a-url title="resolve a url">resolve</a> the <a href=#url>URL</a>
specified in <var title="">src</var>, and if that succeeds, remove
the resulting <a href=#absolute-url>absolute URL</a> from the <a href=#concept-eventsource-list title=concept-eventsource-list>list of event sources</a> for
- that object. If the same URI has been registered multiple times,
- removing it must remove only one instance of that URI for each
+ that object. If the same URL has been registered multiple times,
+ removing it must remove only one instance of that URL for each
invocation of the <code title=removeEventSource>removeEventSource()</code> method. If the
URL fails to resolve, the user agent does nothing.</p>
View
260 source
@@ -36099,8 +36099,8 @@ menu li:not(:first-child)::before { content: ' | '; }</pre>
identifier.</p></li>
<li><p>Let <var title="">scheme</var> be the <span
- title="url-scheme">&lt;scheme&gt;</span> component of the URI,
- <span>converted to lowercase</span>.</p></li>
+ title="url-scheme">&lt;scheme&gt;</span> component of <var
+ title="">url</var>, <span>converted to lowercase</span>.</p></li>
<li><p>If the UA doesn't support the protocol given by <var
title="">scheme</var>, then return a new globally unique
@@ -38239,7 +38239,7 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
a document that uses that content type.</li>
<li>The user agent contacts the third party and hands the third
- party the URI to the Intranet content.</li>
+ party the URL to the Intranet content.</li>
</ol>
@@ -38458,15 +38458,6 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
entries.
- <dt><dfn title="concept-appcache-oppcache">Opportunistically cached entries</dfn>
-
- <dd>Resources whose URLs <span
- title="concept-appcache-matches-oppcache">matched</span> an <span
- title="concept-appcache-oppcache-ns">opportunistic caching
- namespace</span> when they were fetched, and were therefore
- cached in the application cache.
-
-
<dt><dfn title="concept-appcache-dynamic">Dynamic entries</dfn>
<dd>Resources that were added to the cache by the <code
@@ -38481,18 +38472,17 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
</li>
- <li>Zero or more <dfn
- title="concept-appcache-oppcache-ns">opportunistic caching
+ <li>Zero or more <dfn title="concept-appcache-fallback-ns">fallback
namespaces</dfn>: URLs, used as <span
- title="concept-appcache-matches-oppcache">prefix match
+ title="concept-appcache-matches-fallback">prefix match
patterns</span>, each of which is mapped to a <span
title="concept-appcache-fallback">fallback entry</span>. Each
- namespace URL prefix, when parsed as a URL, has the <span>same
- origin</span> as <span title="concept-appcache-manifest">the
- manifest</span>.</li>
+ namespace URL has the <span>same origin</span> as <span
+ title="concept-appcache-manifest">the manifest</span>.</li>
<li>Zero or more URLs that form the <dfn
- title="concept-appcache-onlinewhitelist">online whitelist</dfn>.
+ title="concept-appcache-onlinewhitelist">online whitelist
+ namespaces</dfn>.
</ul>
@@ -38659,31 +38649,25 @@ style/default.css</pre>
empty.</p>
<p>URLs that are to be fallback pages associated with <span
- title="concept-appcache-oppcache-ns">opportunistic caching
- namespaces</span>, and those namespaces themselves, must be given in
- fallback sections, with the namespace being the first URL of the
- data line, and the corresponding fallback page being the second
- URL. All the other pages to be cached must be listed in explicit
- sections.</p>
+ title="concept-appcache-fallback-ns">fallback namespaces</span>, and
+ those namespaces themselves, must be given in fallback sections,
+ with the namespace being the first URL of the data line, and the
+ corresponding fallback page being the second URL. All the other
+ pages to be cached must be listed in explicit sections.</p>
- <p><span title="concept-appcache-oppcache-ns">Opportunistic caching
+ <p><span title="concept-appcache-fallback-ns">Fallback
namespaces</span> must have the <span>same origin</span> as the
manifest itself.</p>
- <p>An opportunistic caching namespace must not be listed more than
- once.</p>
+ <p>A <span title="concept-appcache-fallback-ns">fallback
+ namespace</span> must not be listed more than once.</p>
<p>URLs that the user agent is to put into the <span
title="concept-appcache-onlinewhitelist">online whitelist</span>
must all be specified in online whitelist sections. (This is needed
for any URL that the page is intending to use to communicate back to
the server.)</p>
- <p>URLs in the online whitelist section must not also be listed in
- explicit section, and must not be listed as fallback entries in the
- fallback section. (URLs in the online whitelist section may match
- opportunistic caching namespaces, however.)</p>
-
<p>Relative URLs must be given relative to the manifest's own
URL.</p>
@@ -38712,8 +38696,8 @@ style/default.css</pre>
entries</span>.</p></li>
<li><p>Let <var title="">fallback URLs</var> be an initially empty
- mapping of <span title="concept-appcache-oppcache-ns">opportunistic
- caching namespaces</span> to <span
+ mapping of <span title="concept-appcache-fallback-ns">fallback
+ namespaces</span> to <span
title="concept-appcache-fallback">fallback entries</span>.</p></li>
<li><p>Let <var title="">online whitelist URLs</var> be an
@@ -38908,17 +38892,16 @@ style/default.css</pre>
<p>If the <span>absolute URL</span> corresponding to <var
title="">part one</var> is already in the <var title="">fallback
- URIs</var> mapping as an <span
- title="concept-appcache-oppcache-ns">opportunistic caching
- namespace</span>, then jump back to the step labeled "start of
- line".</p>
+ URLs</var> mapping as a <span
+ title="concept-appcache-fallback-ns">fallback namespace</span>,
+ then jump back to the step labeled "start of line".</p>
<p>Otherwise, add the <span>absolute URL</span> corresponding to
<var title="">part one</var> to the <var title="">fallback
- URIs</var> mapping as an <span
- title="concept-appcache-oppcache-ns">opportunistic caching
- namespace</span>, mapped to the <span>absolute URL</span>
- corresponding to <var title="">part two</var> as the <span
+ URLs</var> mapping as a <span
+ title="concept-appcache-fallback-ns">fallback namespace</span>,
+ mapped to the <span>absolute URL</span> corresponding to <var
+ title="">part two</var> as the <span
title="concept-appcache-fallback">fallback entry</span>.</p>
</dd>
@@ -38970,12 +38953,11 @@ style/default.css</pre>
</ol>
- <p class="note">If a resource is listed in both the online whitelist
- and in the explicit section, then that resource will be fetched and
- cached, but when the page tries to use this resource, the user agent
- will ignore the cached copy and attempt to fetch the file from the
- network. Indeed, the cached copy will only be used if it is opened
- from a top-level browsing context.</p>
+ <p class="note">If a resource is listed in the explicit section and
+ matches an entry in the online whitelist, or if a resource matches
+ both an entry in the fallback section and the online whitelist, the
+ resource will taken from the cache, and the online whitelist entry
+ will be ignored.</p>
<h4>Updating an application cache</h4>
@@ -39060,9 +39042,9 @@ style/default.css</pre>
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-oppcache-ns">opportunistic
- caching namespaces</span> that map to them, and entries for the
- <span title="concept-appcache-onlinewhitelist">online
+ and the <span title="concept-appcache-fallback-ns">fallback
+ namespaces</span> that map to them, and entries for the <span
+ title="concept-appcache-onlinewhitelist">online
whitelist</span>.</p>
</li>
@@ -39152,16 +39134,6 @@ style/default.css</pre>
<li><p>If this is an <span title="concept-appcache-upgrade">upgrade
attempt</span>, then add all the URLs of <span
- title="concept-appcache-oppcache">opportunistically cached
- entries</span> in <var title="">cache</var> that <span
- title="concept-appcache-matches-oppcache">match</span> the <span
- title="concept-appcache-oppcache-ns">opportunistic caching
- namespaces</span> obtained by parsing <var title="">manifest</var>
- to <var title="">file list</var>, each flagged with "opportunistic
- 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-implicit">implicit entries</span> in <var
title="">cache</var> to <var title="">file list</var>, each flagged
with "implicit entry".</p></li>
@@ -39237,12 +39209,6 @@ style/default.css</pre>
entry as a <span title="concept-appcache-fallback">fallback
entry</span>.</p></li>
- <li><p>If the URL being processed was flagged as a "opportunistic
- entry" in <var title="">file list</var>, then categorize the
- entry as an <span
- title="concept-appcache-oppcache">opportunistically cached
- entry</span>.</p></li>
-
<li><p>If the URL being processed was flagged as an "implicit
entry" in <var title="">file list</var>, then categorize the
entry as a <span title="concept-appcache-implicit">implicit
@@ -39263,8 +39229,8 @@ style/default.css</pre>
title="concept-appcache-manifest">the manifest</span>.</p></li>
<li><p>Store the list of <span
- title="concept-appcache-oppcache-ns">opportunistic caching
- namespaces</span>, and the URLs of the <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 the new cache.</p></li>
@@ -39370,28 +39336,28 @@ style/default.css</pre>
title="navigate">navigation</span> model, but references the
algorithms defined in this section.</p>
- <p>A URL <dfn title="concept-appcache-matches-oppcache">matches an
- opportunistic caching namespace</dfn> if there exists an
- <span>application cache</span> whose <span
+ <p>A URL <dfn title="concept-appcache-matches-fallback">matches a
+ fallback namespace</dfn> if there exists an <span>application
+ cache</span> whose <span
title="concept-appcache-manifest">manifest</span>'s URL has the
<span>same origin</span> as the URL in question, and if that
- application cache has an <span
- title="concept-appcache-oppcache-ns">opportunistic caching
- namespace</span> with a <span title="url-path">&lt;path&gt;</span>
- component that exactly matches the start of the <span
+ application cache has a <span
+ title="concept-appcache-fallback-ns">fallback namespace</span> with
+ a <span title="url-path">&lt;path&gt;</span> component that is a
+ <span>prefix match</span> for the <span
title="url-path">&lt;path&gt;</span> component of the URL being
- examined. If multiple opportunistic caching namespaces match the
- same URL, the one with the longest &lt;path&gt; component is the one
- that matches. A URL looking for an opportunistic caching namespace
- can match more than one application cache at a time, but only
- matches one namespace in each cache.</p>
+ examined. If multiple fallback namespaces match the same URL, the
+ one with the longest <span title="url-path">&lt;path&gt;</span> component is the one
+ that matches. A URL looking for an fallback namespace can match more
+ than one application cache at a time, but only matches one namespace
+ in each cache.</p>
<div class="example">
<p>If a manifest <code
title="">http://example.com/app1/manifest</code> declares that
- <code title="">http://example.com/resources/images</code> should be
- opportunistically cached, and the user navigates to <code
+ <code title="">http://example.com/resources/images</code> is a
+ fallback namespace, and the user navigates to <code
title="">http://example.com/resources/images/cat.png</code>, then
the user agent will decide that the application cache identified by
<code title="">http://example.com/app1/manifest</code> contains a
@@ -39560,40 +39526,38 @@ style/default.css</pre>
title="concept-appcache-implicit">an implicit entry</span>, <span
title="concept-appcache-manifest">the manifest</span>, <span
title="concept-appcache-explicit">an explicit entry</span>, <span
- title="concept-appcache-fallback">a fallback entry</span>, <span
- title="concept-appcache-oppcache">an opportunistically cached
- entry</span>, or a <span title="concept-appcache-dynamic">dynamic
- entry</span> in the <span>application cache</span>, then get the
- resource from the cache (instead of fetching it), and abort these
- steps.</p></li>
-
- <li><p>If there is an entry in the <span>application cache</span>'s
- <span title="concept-appcache-onlinewhitelist">online
- whitelist</span> that has the <span>same origin</span> as the
- resource's URL and that is a <span>prefix match</span> for the
- resource's URL, then <span>fetch</span> the resource normally and
- abort these steps.</p></li>
+ title="concept-appcache-fallback">a fallback entry</span>, or a
+ <span title="concept-appcache-dynamic">dynamic entry</span> in the
+ <span>application cache</span>, then get the resource from the
+ cache (instead of fetching it), and abort these steps.</p></li>
<li>
<p>If the resource's URL has the <span>same origin</span> as the
- manifest's URL, and there is an <span
- title="concept-appcache-oppcache-ns">opportunistic caching
- namespace</span> in the <span>application cache</span> whose
- &lt;path&gt; component is a <span>prefix match</span> for the
- resource's URL's <span title="url-path">&lt;path&gt;</span>
- component, then:
+ manifest's URL, and there is a <span
+ title="concept-appcache-fallback-ns">fallback namespace</span> in
+ the <span>application cache</span> whose &lt;path&gt; component is
+ a <span>prefix match</span> for the resource's URL's <span
+ title="url-path">&lt;path&gt;</span> component, then:</p>
<p><span>Fetch</span> the resource normally. If this results 4xx
or 5xx status codes or equivalent, or if there were network errors
(but not if the user canceled the download), then instead get,
from the cache, the resource of the <span
title="concept-appcache-fallback">fallback entry</span>
- corresponding to the namespace with the longest matching
- &lt;path&gt; component. Abort these steps.</p>
+ corresponding to the namespace with the longest matching <span
+ title="url-path">&lt;path&gt;</span> component. Abort these
+ steps.</p>
</li>
+ <li><p>If there is an entry in the <span>application cache</span>'s
+ <span title="concept-appcache-onlinewhitelist">online
+ whitelist</span> that has the <span>same origin</span> as the
+ resource's URL and that is a <span>prefix match</span> for the
+ resource's URL, then <span>fetch</span> the resource normally and
+ abort these steps.</p></li>
+
<li><p>Fail the resource load.</p></li>
</ol>
@@ -40594,61 +40558,37 @@ user reload must be equivalent to .reload()
<p>If the resource was not fetched from an <span>application
cache</span>, and was to be fetched using HTTP GET or equivalent,
and its URL <span
- title="concept-appcache-matches-oppcache">matches the
- opportunistic caching namespace</span> of one or more application
- caches, and the user didn't cancel the navigation attempt during
- the previous step, then:</p>
-
- <dl class="switch">
-
- <dt>If the browsing context being navigated is a <span>top-level
- browsing context</span>, and the navigation attempt failed
- (e.g. the server returned a 4xx or 5xx status code or equivalent,
- or there was a DNS error)</dt>
-
- <dd>
-
- <p>Let <var title="">candidate</var> be the <span
- title="concept-appcache-fallback">fallback resource</span>
- specified for the opportunistic caching namespace in
- question. If multiple application caches match, the user agent
- must use the fallback of the <span
- title="concept-appcache-selection">most appropriate application
- cache</span> of those that match.</p>
-
- <p>If <var title="">candidate</var> is not marked as <span
- title="concept-appcache-foreign">foreign</span>, then the user
- agent must discard the failed load and instead continue along
- these steps using <var title="">candidate</var> as the
- resource.</p>
-
- <p>For the purposes of session history (and features that depend
- on session history, e.g. bookmarking) the user agent must use
- the URL of the resource that was requested (the one that matched
- the opportunistic caching namespace), not the fallback
- resource. However, the user agent may indicate to the user that
- the original page load failed, that the page used was a fallback
- resource, and what the URL of the fallback resource actually
- is.</p>
-
- </dd>
-
- <dt>Otherwise</dt>
-
- <dd>
-
- <p>Once the download is complete, if there were no errors and
- the user didn't cancel the request, the user agent must cache
- the resource in all the application caches that have a <span
- title="concept-appcache-matches-oppcache">matching opportunistic
- caching namespace</span>, categorized as <span
- title="concept-appcache-oppcache">opportunistically cached
- entries</span>. Meanwhile, the user agent must continue along
- these steps.</p>
+ title="concept-appcache-matches-fallback">matches the fallback
+ namespace</span> of one or more application caches, and the user
+ didn't cancel the navigation attempt during the previous step, and
+ the browsing context being navigated is a <span>top-level browsing
+ context</span>, and the navigation attempt failed (e.g. the server
+ returned a 4xx or 5xx status code or equivalent, or there was a
+ DNS error), then:</p>
+
+ <p>Let <var title="">candidate</var> be the <span
+ title="concept-appcache-fallback">fallback resource</span>
+ specified for the <span
+ title="concept-appcache-fallback-ns">fallback namespace</span> in
+ question. If multiple application caches match, the user agent
+ must use the fallback of the <span
+ title="concept-appcache-selection">most appropriate application
+ cache</span> of those that match.</p>
- </dd>
+ <p>If <var title="">candidate</var> is not marked as <span
+ title="concept-appcache-foreign">foreign</span>, then the user
+ agent must discard the failed load and instead continue along
+ these steps using <var title="">candidate</var> as the
+ resource.</p>
- </dl>
+ <p>For the purposes of session history (and features that depend
+ on session history, e.g. bookmarking) the user agent must use the
+ URL of the resource that was requested (the one that matched the
+ <span title="concept-appcache-fallback-ns">fallback
+ namespace</span>), not the fallback resource. However, the user
+ agent may indicate to the user that the original page load failed,
+ that the page used was a fallback resource, and what the URL of
+ the fallback resource actually is.</p>
</li>
@@ -46821,8 +46761,8 @@ XXX Once we resolve the style="" issue, address these:
specified in <var title="">src</var>, and if that succeeds, remove
the resulting <span>absolute URL</span> from the <span
title="concept-eventsource-list">list of event sources</span> for
- that object. If the same URI has been registered multiple times,
- removing it must remove only one instance of that URI for each
+ that object. If the same URL has been registered multiple times,
+ removing it must remove only one instance of that URL for each
invocation of the <code
title="removeEventSource">removeEventSource()</code> method. If the
URL fails to resolve, the user agent does nothing.</p>

0 comments on commit 556b6eb

Please sign in to comment.