Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[gw] (2) Allow HTML and XML files to be fetched from an application c…
…ache despite not having a manifest (same-origin caches only, of course).

git-svn-id: http://svn.whatwg.org/webapps@2808 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 13, 2009
1 parent 1e2ca39 commit 5bcca22
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 64 deletions.
54 changes: 25 additions & 29 deletions index
Expand Up @@ -40918,19 +40918,14 @@ style/default.css</pre>

<p>When the <dfn id=concept-appcache-init title=concept-appcache-init>application cache
selection algorithm</dfn> algorithm is invoked with a
<code>Document</code> <var title="">document</var>, a flag <var title="">document-is-markup</var> which can be true or false, and
optionally a manifest <a href=#url>URL</a> <var title="">manifest
URL</var>, the user agent must run the first applicable set of steps
from the following list:</p>
<code>Document</code> <var title="">document</var> and optionally a
manifest <a href=#url>URL</a> <var title="">manifest URL</var>, the user
agent must run the first applicable set of steps from the following
list:</p>

<dl class=switch>

<dt>If the flag <var title="">document-is-markup</var> is true, and
<var title="">document</var> was loaded from an <a href=#application-cache>application
cache</a>, and there is no <var title="">manifest URL</var></dt>

<dt>If the flag <var title="">document-is-markup</var> is true, If
<var title="">document</var> was loaded from an <a href=#application-cache>application
<dt>If there is a <var title="">manifest URL</var>, and <var title="">document</var> was loaded from an <a href=#application-cache>application
cache</a>, and the URL of the <a href=#concept-appcache-manifest title=concept-appcache-manifest>manifest</a> of that cache's
<a href=#application-cache-group>application cache group</a> is <em>not</em> the same as
<var title="">manifest URL</var></dt>
Expand Down Expand Up @@ -40959,9 +40954,10 @@ style/default.css</pre>


<dt>If <var title="">document</var> was loaded from an
<a href=#application-cache>application cache</a><!--[redundant], and the URL of the
<span title="concept-appcache-manifest">manifest</span> of that
cache's <span>application cache group</span> is the same as <var
<a href=#application-cache>application cache</a><!--[redundant], and either there is
no <var title="">manifest URL</var>, or the URL of the <span
title="concept-appcache-manifest">manifest</span> of the cache's
<span>application cache group</span> is the same as <var
title="">manifest URL</var>--></dt>

<dd>
Expand All @@ -40977,8 +40973,9 @@ style/default.css</pre>
<dt>If <var title="">document</var> <!--[redundant] was not loaded
from an <span>application cache</span>, but it--> was loaded using
HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or
equivalent</a>, and <var title="">manifest URL</var> has the
<a href=#same-origin>same origin</a> as <var title="">document</var></dt>
equivalent</a>, and, there is a <var title="">manifest
URL</var>, and <var title="">manifest URL</var> has the <a href=#same-origin>same
origin</a> as <var title="">document</var></dt>

<dd>

Expand All @@ -40989,7 +40986,8 @@ style/default.css</pre>
</dd>


<dt>Otherwise</dt> <!-- not from cache and either non GET or wrong-origin manifest -->
<dt>Otherwise</dt> <!-- not from cache and either no <var
title="">manifest URL</var>, or non-GET, or wrong-origin manifest -->

<dd>

Expand Down Expand Up @@ -42201,14 +42199,12 @@ user reload must be equivalent to .reload()
into the document</a>, the user agent must <a href=#resolve-a-url title="resolve a
url">resolve</a> the value of that attribute relative to that
element, and if that is successful, must run the <a href=#concept-appcache-init title=concept-appcache-init>application cache selection
algorithm</a> with the <var title="">document-is-markup</var>
flag set to true, the resulting <a href=#absolute-url>absolute URL</a> as the
algorithm</a> with the resulting <a href=#absolute-url>absolute URL</a> as the
manifest URL, and passing in the newly-created
<code>Document</code>. Otherwise, if the attribute is absent or
resolving it fails, then as soon as the root element is <a href=#insert-an-element-into-a-document title="insert an element into a document">inserted into the
document</a>, the user agent must run the <a href=#concept-appcache-init title=concept-appcache-init>application cache selection
algorithm</a> with the <var title="">document-is-markup</var>
flag set to true, no manifest, and passing in the
algorithm</a> with no manifest, and passing in the
<code>Document</code>.</p>

<p class=note>Because the processing of the <code title=attr-html-manifest><a href=#attr-html-manifest>manifest</a></code> attribute happens
Expand Down Expand Up @@ -42259,8 +42255,8 @@ user reload must be equivalent to .reload()

<p>Upon creation of the <code>Document</code> object, the user agent
must run the <a href=#concept-appcache-init title=concept-appcache-init>application cache
selection algorithm</a> with the <var title="">document-is-markup</var> flag set to false, no manifest,
and passing in the newly-created <code>Document</code>.</p>
selection algorithm</a> with no manifest, and passing in the
newly-created <code>Document</code>.</p>

<!-- next two paragraphs are nearly identical to the navigate-html
section and similar to the "navigate-ua-inline" section, and the
Expand Down Expand Up @@ -42300,8 +42296,8 @@ user reload must be equivalent to .reload()

<p>Upon creation of the <code>Document</code> object, the user agent
must run the <a href=#concept-appcache-init title=concept-appcache-init>application cache
selection algorithm</a> with the <var title="">document-is-markup</var> flag set to false, no manifest,
and passing in the newly-created <code>Document</code>.</p>
selection algorithm</a> with no manifest, and passing in the
newly-created <code>Document</code>.</p>

<p>After creating the <code>Document</code> object, but potentially
before the page has finished fully loading, the user agent must
Expand Down Expand Up @@ -42333,8 +42329,8 @@ user reload must be equivalent to .reload()

<p>Upon creation of the <code>Document</code> object, the user agent
must run the <a href=#concept-appcache-init title=concept-appcache-init>application cache
selection algorithm</a> with the <var title="">document-is-markup</var> flag set to false, no manifest,
and passing in the newly-created <code>Document</code>.</p>
selection algorithm</a> with no manifest, and passing in the
newly-created <code>Document</code>.</p>

<p>After creating the <code>Document</code> object, but potentially
before the page has finished fully loading, the user agent must
Expand Down Expand Up @@ -42369,8 +42365,8 @@ user reload must be equivalent to .reload()

<p>Upon creation of the <code>Document</code> object, the user agent
must run the <a href=#concept-appcache-init title=concept-appcache-init>application cache
selection algorithm</a> with the <var title="">document-is-markup</var> flag set to false, no manifest,
passing in the newly-created <code>Document</code>.</p>
selection algorithm</a> with no manifest, passing in the
newly-created <code>Document</code>.</p>

<p>After creating the <code>Document</code> object, but potentially
before the page has been completely set up, the user agent must
Expand Down Expand Up @@ -54251,7 +54247,7 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
otherwise, if there is no such attribute or resolving it fails,
run the <a href=#concept-appcache-init title=concept-appcache-init>application cache
selection algorithm</a> with no manifest. The algorithm must be
passed the <code>Document</code> object, and the <var title="">document-is-markup</var> flag must be set to true.</p>
passed the <code>Document</code> object.</p>

<p>Switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#the-before-head-insertion-mode title="insertion mode: before head">before head</a>".</p>

Expand Down
61 changes: 26 additions & 35 deletions source
Expand Up @@ -43739,20 +43739,15 @@ style/default.css</pre>

<p>When the <dfn title="concept-appcache-init">application cache
selection algorithm</dfn> algorithm is invoked with a
<code>Document</code> <var title="">document</var>, a flag <var
title="">document-is-markup</var> which can be true or false, and
optionally a manifest <span>URL</span> <var title="">manifest
URL</var>, the user agent must run the first applicable set of steps
from the following list:</p>
<code>Document</code> <var title="">document</var> and optionally a
manifest <span>URL</span> <var title="">manifest URL</var>, the user
agent must run the first applicable set of steps from the following
list:</p>

<dl class="switch">

<dt>If the flag <var title="">document-is-markup</var> is true, and
<var title="">document</var> was loaded from an <span>application
cache</span>, and there is no <var title="">manifest URL</var></dt>

<dt>If the flag <var title="">document-is-markup</var> is true, If
<var title="">document</var> was loaded from an <span>application
<dt>If there is a <var title="">manifest URL</var>, and <var
title="">document</var> was loaded from an <span>application
cache</span>, and the URL of the <span
title="concept-appcache-manifest">manifest</span> of that cache's
<span>application cache group</span> is <em>not</em> the same as
Expand Down Expand Up @@ -43785,9 +43780,10 @@ style/default.css</pre>


<dt>If <var title="">document</var> was loaded from an
<span>application cache</span><!--[redundant], and the URL of the
<span title="concept-appcache-manifest">manifest</span> of that
cache's <span>application cache group</span> is the same as <var
<span>application cache</span><!--[redundant], and either there is
no <var title="">manifest URL</var>, or the URL of the <span
title="concept-appcache-manifest">manifest</span> of the cache's
<span>application cache group</span> is the same as <var
title="">manifest URL</var>--></dt>

<dd>
Expand All @@ -43803,8 +43799,9 @@ style/default.css</pre>
<dt>If <var title="">document</var> <!--[redundant] was not loaded
from an <span>application cache</span>, but it--> was loaded using
HTTP GET <span title="concept-http-equivalent-get">or
equivalent</span>, and <var title="">manifest URL</var> has the
<span>same origin</span> as <var title="">document</var></dt>
equivalent</span>, and, there is a <var title="">manifest
URL</var>, and <var title="">manifest URL</var> has the <span>same
origin</span> as <var title="">document</var></dt>

<dd>

Expand All @@ -43818,7 +43815,8 @@ style/default.css</pre>
</dd>


<dt>Otherwise</dt> <!-- not from cache and either non GET or wrong-origin manifest -->
<dt>Otherwise</dt> <!-- not from cache and either no <var
title="">manifest URL</var>, or non-GET, or wrong-origin manifest -->

<dd>

Expand Down Expand Up @@ -45147,16 +45145,14 @@ user reload must be equivalent to .reload()
url">resolve</span> the value of that attribute relative to that
element, and if that is successful, must run the <span
title="concept-appcache-init">application cache selection
algorithm</span> with the <var title="">document-is-markup</var>
flag set to true, the resulting <span>absolute URL</span> as the
algorithm</span> with the resulting <span>absolute URL</span> as the
manifest URL, and passing in the newly-created
<code>Document</code>. Otherwise, if the attribute is absent or
resolving it fails, then as soon as the root element is <span
title="insert an element into a document">inserted into the
document</span>, the user agent must run the <span
title="concept-appcache-init">application cache selection
algorithm</span> with the <var title="">document-is-markup</var>
flag set to true, no manifest, and passing in the
algorithm</span> with no manifest, and passing in the
<code>Document</code>.</p>

<p class="note">Because the processing of the <code
Expand Down Expand Up @@ -45212,9 +45208,8 @@ user reload must be equivalent to .reload()

<p>Upon creation of the <code>Document</code> object, the user agent
must run the <span title="concept-appcache-init">application cache
selection algorithm</span> with the <var
title="">document-is-markup</var> flag set to false, no manifest,
and passing in the newly-created <code>Document</code>.</p>
selection algorithm</span> with no manifest, and passing in the
newly-created <code>Document</code>.</p>

<!-- next two paragraphs are nearly identical to the navigate-html
section and similar to the "navigate-ua-inline" section, and the
Expand Down Expand Up @@ -45255,9 +45250,8 @@ user reload must be equivalent to .reload()

<p>Upon creation of the <code>Document</code> object, the user agent
must run the <span title="concept-appcache-init">application cache
selection algorithm</span> with the <var
title="">document-is-markup</var> flag set to false, no manifest,
and passing in the newly-created <code>Document</code>.</p>
selection algorithm</span> with no manifest, and passing in the
newly-created <code>Document</code>.</p>

<p>After creating the <code>Document</code> object, but potentially
before the page has finished fully loading, the user agent must
Expand Down Expand Up @@ -45290,9 +45284,8 @@ user reload must be equivalent to .reload()

<p>Upon creation of the <code>Document</code> object, the user agent
must run the <span title="concept-appcache-init">application cache
selection algorithm</span> with the <var
title="">document-is-markup</var> flag set to false, no manifest,
and passing in the newly-created <code>Document</code>.</p>
selection algorithm</span> with no manifest, and passing in the
newly-created <code>Document</code>.</p>

<p>After creating the <code>Document</code> object, but potentially
before the page has finished fully loading, the user agent must
Expand Down Expand Up @@ -45328,9 +45321,8 @@ user reload must be equivalent to .reload()

<p>Upon creation of the <code>Document</code> object, the user agent
must run the <span title="concept-appcache-init">application cache
selection algorithm</span> with the <var
title="">document-is-markup</var> flag set to false, no manifest,
passing in the newly-created <code>Document</code>.</p>
selection algorithm</span> with no manifest, passing in the
newly-created <code>Document</code>.</p>

<p>After creating the <code>Document</code> object, but potentially
before the page has been completely set up, the user agent must
Expand Down Expand Up @@ -58002,8 +57994,7 @@ interface <dfn>MessageChannel</dfn> {
otherwise, if there is no such attribute or resolving it fails,
run the <span title="concept-appcache-init">application cache
selection algorithm</span> with no manifest. The algorithm must be
passed the <code>Document</code> object, and the <var
title="">document-is-markup</var> flag must be set to true.</p>
passed the <code>Document</code> object.</p>

<p>Switch the <span>insertion mode</span> to "<span
title="insertion mode: before head">before head</span>".</p>
Expand Down

0 comments on commit 5bcca22

Please sign in to comment.