Skip to content
Permalink
Browse files

[giow] (1) Support 'no-store' in appcache. This means we can now allo…

…w cross-origin HTTPS caching, too, without making things worse than the regular HTTP cache.

git-svn-id: http://svn.whatwg.org/webapps@6194 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Jun 7, 2011
1 parent b52b3d2 commit fdffd1caa2d1455bc676e2edec54a0a696efaf6b
Showing with 96 additions and 87 deletions.
  1. +32 −28 complete.html
  2. +32 −28 index
  3. +32 −31 source

<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>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 6 June 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 7 June 2011</h2>
</hgroup><dl><dt>Multiple-page version:</dt>
<dd><a href=http://www.whatwg.org/specs/web-apps/current-work/complete/>http://www.whatwg.org/specs/web-apps/current-work/complete/</a></dd>
<dt>One-page version:</dt>
manifest is automatically cached even if it isn't explicitly
mentioned.</p>

<p class=note>HTTP cache headers and restrictions on caching pages
served over TLS (encrypted, using <code title="">https:</code>) are
overridden by manifests. Thus, pages will not expire from an
application cache before the user agent has updated it, and even
applications served over TLS can be made to work offline.</p>
<p class=note>With the exception of "no-store" directive, HTTP
cache headers and restrictions on caching pages served over TLS
(encrypted, using <code title="">https:</code>) are overridden by
manifests. Thus, pages will not expire from an application cache
before the user agent has updated it, and even applications served
over TLS can be made to work offline.</p>

<!--(doesn't currently function)
<p><a href="http://www.whatwg.org/demos/offline/clock/clock2.html">View this example online</a>.</p>
</dl><p>Manifests may contain sections more than once. Sections may be
empty.</p>

<p>If the manifest's <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a>
is <code title="">https:</code> or another scheme intended for
encrypted data transfer, then all URLs in <a href=#concept-appcache-manifest-explicit title=concept-appcache-manifest-explicit>explicit sections</a>
must have the <a href=#same-origin>same origin</a> as the manifest itself.</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 <a href=#concept-appcache-manifest-fallback title=concept-appcache-manifest-fallback>fallback sections</a>,
with the namespace being the first URL of the data line, and the
<a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a> component than
the manifest's URL (compared in an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> manner), then jump back to the step
labeled "start of line". If the manifest's <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a> is <code title="">https:</code> or another scheme intended for encrypted
data transfer, and the resulting <a href=#absolute-url>absolute URL</a> does
not have the <a href=#same-origin>same origin</a> as the manifest's URL,
then jump back to the step labeled "start of line".</p>
labeled "start of line".</p>

<p>Drop the <a href=#url-fragment title=url-fragment>&lt;fragment&gt;</a>
component of the resulting <a href=#absolute-url>absolute URL</a>, if it has
checking the magic signature), or if the server returned a
redirect, or if the resource is labeled with a <a href=#mime-type>MIME
type</a> other than <code><a href=#text/cache-manifest>text/cache-manifest</a></code>, then run
the <a href=#cache-failure-steps>cache failure steps</a>.</p>
the <a href=#cache-failure-steps>cache failure steps</a>. <a href=#refsHTTP>[HTTP]</a></p>

</li>

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 connection times out, or the
user cancels the download), then create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple
<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 <a href=#cache-host>cache
host</a> 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
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>
be removed from the entry in <var title="">cache</var>
(application caches never include fragment identifiers).</p>

<p class=note>HTTP caching rules, such as <code title="">Cache-Control: no-store</code>, are ignored for the
purposes of the <a href=#application-cache-download-process>application cache download
process</a>.</p>

</li>

<li><p>For each <a href=#cache-host>cache host</a> associated with an
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, then run the first appropriate step from
the following list:</p>
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 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>

<dd>

<p>Skip this resource. It is dropped from the cache.</p>
without errors, and making non-manifest resources survive
server-side errors.</p>

<p class=note>Except for the "no-store" directive, HTTP
caching rules are ignored for the purposes of the
<a href=#application-cache-download-process>application cache download process</a>.</p>

</li>

<li>
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 connection times out, or the
user cancels the download), 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>
60 index

<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 &mdash; Last Updated 6 June 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 7 June 2011</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>
manifest is automatically cached even if it isn't explicitly
mentioned.</p>

<p class=note>HTTP cache headers and restrictions on caching pages
served over TLS (encrypted, using <code title="">https:</code>) are
overridden by manifests. Thus, pages will not expire from an
application cache before the user agent has updated it, and even
applications served over TLS can be made to work offline.</p>
<p class=note>With the exception of "no-store" directive, HTTP
cache headers and restrictions on caching pages served over TLS
(encrypted, using <code title="">https:</code>) are overridden by
manifests. Thus, pages will not expire from an application cache
before the user agent has updated it, and even applications served
over TLS can be made to work offline.</p>

<!--(doesn't currently function)
<p><a href="http://www.whatwg.org/demos/offline/clock/clock2.html">View this example online</a>.</p>
</dl><p>Manifests may contain sections more than once. Sections may be
empty.</p>

<p>If the manifest's <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a>
is <code title="">https:</code> or another scheme intended for
encrypted data transfer, then all URLs in <a href=#concept-appcache-manifest-explicit title=concept-appcache-manifest-explicit>explicit sections</a>
must have the <a href=#same-origin>same origin</a> as the manifest itself.</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 <a href=#concept-appcache-manifest-fallback title=concept-appcache-manifest-fallback>fallback sections</a>,
with the namespace being the first URL of the data line, and the
<a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a> component than
the manifest's URL (compared in an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> manner), then jump back to the step
labeled "start of line". If the manifest's <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a> is <code title="">https:</code> or another scheme intended for encrypted
data transfer, and the resulting <a href=#absolute-url>absolute URL</a> does
not have the <a href=#same-origin>same origin</a> as the manifest's URL,
then jump back to the step labeled "start of line".</p>
labeled "start of line".</p>

<p>Drop the <a href=#url-fragment title=url-fragment>&lt;fragment&gt;</a>
component of the resulting <a href=#absolute-url>absolute URL</a>, if it has
checking the magic signature), or if the server returned a
redirect, or if the resource is labeled with a <a href=#mime-type>MIME
type</a> other than <code><a href=#text/cache-manifest>text/cache-manifest</a></code>, then run
the <a href=#cache-failure-steps>cache failure steps</a>.</p>
the <a href=#cache-failure-steps>cache failure steps</a>. <a href=#refsHTTP>[HTTP]</a></p>

</li>

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 connection times out, or the
user cancels the download), then create a <a href=#concept-task title=concept-task>task</a> to <a href=#fire-a-simple-event>fire a simple
<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 <a href=#cache-host>cache
host</a> 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
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>
be removed from the entry in <var title="">cache</var>
(application caches never include fragment identifiers).</p>

<p class=note>HTTP caching rules, such as <code title="">Cache-Control: no-store</code>, are ignored for the
purposes of the <a href=#application-cache-download-process>application cache download
process</a>.</p>

</li>

<li><p>For each <a href=#cache-host>cache host</a> associated with an
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, then run the first appropriate step from
the following list:</p>
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 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>

<dd>

<p>Skip this resource. It is dropped from the cache.</p>
without errors, and making non-manifest resources survive
server-side errors.</p>

<p class=note>Except for the "no-store" directive, HTTP
caching rules are ignored for the purposes of the
<a href=#application-cache-download-process>application cache download process</a>.</p>

</li>

<li>
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 connection times out, or the
user cancels the download), 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>

0 comments on commit fdffd1c

Please sign in to comment.
You can’t perform that action at this time.