- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 18 Aug 2011 21:37:54 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv10269
Modified Files:
Overview.html
Log Message:
Explain the appcache API more. (whatwg r6510)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.5209
retrieving revision 1.5210
diff -u -d -r1.5209 -r1.5210
--- Overview.html 18 Aug 2011 00:01:01 -0000 1.5209
+++ Overview.html 18 Aug 2011 21:37:49 -0000 1.5210
@@ -49053,6 +49053,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>
@@ -49060,6 +49069,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>
@@ -49075,6 +49088,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">
Received on Thursday, 18 August 2011 21:37:55 UTC