Name
ApplicationCache — application cache management API
Inherits from
EventTarget
Synopsis
The ApplicationCache object is the value of the applicationCache
property of the Window
object. It defines an API for managing updates to cached
applications. For simple cached applications, there is no need to
use this API: it is sufficient to create (and update, as needed) an
appropriate cache manifest, as described in Application Storage and Offline Webapps. More complex cached applications that
want to more actively manage updates can use the properties,
methods, and event handlers described here. See Cache Updates for more details.
Constants
The following constants are the possible values of the
status
property.
unsigned short
UNCACHED
= 0This application does not have a
manifest
attribute: it is not cached.unsigned short
IDLE
= 1The manifest has been checked and this application is cached and up-to-date.
unsigned short
CHECKING
= 2The browser is currently checking the manifest file.
unsigned short
DOWNLOADING
= 3The browser is downloading and caching files listed in the manifest.
unsigned short
UPDATEREADY
= 4A new version of the application has been downloaded and cached.
unsigned short
OBSOLETE
= 5The manifest no longer exists and the cache will be deleted.
Properties
readonly unsigned short
status
This property describes the cache status of the current document. Its value will be one of the constants listed above.
Methods
void swapCache
()
swapCache
()When the status
property
is UPDATEREADY
, the browser is maintaining ...
Get JavaScript: The Definitive Guide, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.