- From: poot <cvsmail@w3.org>
- Date: Thu, 18 Aug 2011 17:39:54 -0400
- To: public-html-diffs@w3.org
hixie: Explain the appcache API more. (whatwg r6510) http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.5209&r2=1.5210&f=h http://html5.org/tools/web-apps-tracker?from=6509&to=6510 =================================================================== 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:39:56 UTC