[html5] r6510 - [e] (0) Explain the appcache API more. Fixing http://www.w3.org/Bugs/Public/show [...]
whatwg at whatwg.org
whatwg at whatwg.org
Thu Aug 18 14:37:13 PDT 2011
Author: ianh
Date: 2011-08-18 14:37:11 -0700 (Thu, 18 Aug 2011)
New Revision: 6510
Modified:
complete.html
index
source
Log:
[e] (0) Explain the appcache API more.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12967
Modified: complete.html
===================================================================
--- complete.html 2011-08-18 00:02:01 UTC (rev 6509)
+++ complete.html 2011-08-18 21:37:11 UTC (rev 6510)
@@ -67621,6 +67621,15 @@
<p>Throws an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if there is no application cache to update.</p>
+ <p>Calling this method is not usually necessary, as user agents
+ will generally take care of updating <a href=#application-cache title="application
+ cache">application caches</a> automatically.</p>
+
+ <p>The method can be useful in situations such as long-lived
+ applications. For example, a Web mail application might stay open
+ in a browser tab for weeks at a time. Such an application could
+ want to test for updates each day.</p>
+
</dd>
<dt><var title="">cache</var> . <code title=dom-appcache-abort><a href=#dom-appcache-abort>abort</a></code>()</dt>
@@ -67628,6 +67637,10 @@
<p>Cancels the <a href=#application-cache-download-process>application cache download process</a>.</p>
+ <p>This method is intended to be used by Web application showing
+ their own caching progress UI, in case the user wants to stop the
+ update (e.g. because bandwidth is limited).</p>
+
</dd>
<dt><var title="">cache</var> . <code title=dom-appcache-swapCache><a href=#dom-appcache-swapcache>swapCache</a></code>()</dt>
@@ -67643,6 +67656,18 @@
that subsequent requests for cached resources will obtain the
newer copies.</p>
+ <p>The <code title=event-appcache-updateready><a href=#event-appcache-updateready>updateready</a></code>
+ event will fire before this method can be called. Once it fires,
+ the Web application can, at its leisure, call this method to
+ switch the underlying cache to the one with the more recent
+ updates. To make proper use of this, applications have to be able
+ to bring the new features into play; for example, reloading
+ scripts to enable new features.</p>
+
+ <p>An easier alternative to <code title=dom-appcache-swapCache><a href=#dom-appcache-swapcache>swapCache()</a></code> is just to
+ reload the entire page at a time suitable for the user, using
+ <code title=dom-location-reload><a href=#dom-location-reload>location.reload()</a></code>.</p>
+
</dd>
</dl><div class=impl>
Modified: index
===================================================================
--- index 2011-08-18 00:02:01 UTC (rev 6509)
+++ index 2011-08-18 21:37:11 UTC (rev 6510)
@@ -67500,6 +67500,15 @@
<p>Throws an <code><a href=#invalid_state_err>INVALID_STATE_ERR</a></code> exception if there is no application cache to update.</p>
+ <p>Calling this method is not usually necessary, as user agents
+ will generally take care of updating <a href=#application-cache title="application
+ cache">application caches</a> automatically.</p>
+
+ <p>The method can be useful in situations such as long-lived
+ applications. For example, a Web mail application might stay open
+ in a browser tab for weeks at a time. Such an application could
+ want to test for updates each day.</p>
+
</dd>
<dt><var title="">cache</var> . <code title=dom-appcache-abort><a href=#dom-appcache-abort>abort</a></code>()</dt>
@@ -67507,6 +67516,10 @@
<p>Cancels the <a href=#application-cache-download-process>application cache download process</a>.</p>
+ <p>This method is intended to be used by Web application showing
+ their own caching progress UI, in case the user wants to stop the
+ update (e.g. because bandwidth is limited).</p>
+
</dd>
<dt><var title="">cache</var> . <code title=dom-appcache-swapCache><a href=#dom-appcache-swapcache>swapCache</a></code>()</dt>
@@ -67522,6 +67535,18 @@
that subsequent requests for cached resources will obtain the
newer copies.</p>
+ <p>The <code title=event-appcache-updateready><a href=#event-appcache-updateready>updateready</a></code>
+ event will fire before this method can be called. Once it fires,
+ the Web application can, at its leisure, call this method to
+ switch the underlying cache to the one with the more recent
+ updates. To make proper use of this, applications have to be able
+ to bring the new features into play; for example, reloading
+ scripts to enable new features.</p>
+
+ <p>An easier alternative to <code title=dom-appcache-swapCache><a href=#dom-appcache-swapcache>swapCache()</a></code> is just to
+ reload the entire page at a time suitable for the user, using
+ <code title=dom-location-reload><a href=#dom-location-reload>location.reload()</a></code>.</p>
+
</dd>
</dl><div class=impl>
Modified: source
===================================================================
--- source 2011-08-18 00:02:01 UTC (rev 6509)
+++ source 2011-08-18 21:37:11 UTC (rev 6510)
@@ -76840,6 +76840,15 @@
<p>Throws an <code>INVALID_STATE_ERR</code> exception if there is no application cache to update.</p>
+ <p>Calling this method is not usually necessary, as user agents
+ will generally take care of updating <span title="application
+ cache">application caches</span> automatically.</p>
+
+ <p>The method can be useful in situations such as long-lived
+ applications. For example, a Web mail application might stay open
+ in a browser tab for weeks at a time. Such an application could
+ want to test for updates each day.</p>
+
</dd>
<dt><var title="">cache</var> . <code title="dom-appcache-abort">abort</code>()</dt>
@@ -76847,6 +76856,10 @@
<p>Cancels the <span>application cache download process</span>.</p>
+ <p>This method is intended to be used by Web application showing
+ their own caching progress UI, in case the user wants to stop the
+ update (e.g. because bandwidth is limited).</p>
+
</dd>
<dt><var title="">cache</var> . <code title="dom-appcache-swapCache">swapCache</code>()</dt>
@@ -76862,6 +76875,19 @@
that subsequent requests for cached resources will obtain the
newer copies.</p>
+ <p>The <code title="event-appcache-updateready">updateready</code>
+ event will fire before this method can be called. Once it fires,
+ the Web application can, at its leisure, call this method to
+ switch the underlying cache to the one with the more recent
+ updates. To make proper use of this, applications have to be able
+ to bring the new features into play; for example, reloading
+ scripts to enable new features.</p>
+
+ <p>An easier alternative to <code
+ title="dom-appcache-swapCache">swapCache()</code> is just to
+ reload the entire page at a time suitable for the user, using
+ <code title="dom-location-reload">location.reload()</code>.</p>
+
</dd>
</dl>
More information about the Commit-Watchers
mailing list