JavaScripture
Contribute via GitHub Feedback

ApplicationCache : EventTarget

The ApplicationCache describes the state of files cached for the current page. Pages set the manifest="<location to manifest>" attribute on the <html> tag to define the set of files to be cached. Obtained through the window.applicationCache property. See Offline WebPage Spec for more details.

Instance Properties

status : Number  

The current status of the cache. Will be one of UNCACHED, IDLE, CHECKING, DOWNLOADING, or UPDATEREADY.

Instance Methods

swapCache() : undefined

Replaces application cache with the updated list of files from the server. This does not automatically update the resources of the page. You can use location.reload() to update the page.

update() : undefined

Checks to see if there is an updated manifest file on the server. This automatically happens once when the page first loads.

Instance Events

oncached / 'cached'  
listener(event : Event) : undefined

onchecking / 'checking'  
listener(event : Event) : undefined

Event fired when the browser is going to check to see if the manifest has been updated on the server.

ondownloading / 'downloading'  
listener(event : Event) : undefined

Event fired when the manifest has upated and the browser is going to start downloading it.

onerror / 'error'  
listener(event : Event) : undefined

Event fired when the server returned an error status when attempting to download the app manifest.

onnoupdate / 'noupdate'  
listener(event : Event) : undefined

onprogress / 'progress'  
listener(event : ProgressEvent) : undefined

onupdateready / 'updateready'  
listener(event : Event) : undefined

Event fired when all resources listed in the manifest have been downloaded.

ApplicationCache Properties

CHECKING : Number  

DOWNLOADING : Number  

IDLE : Number  

UNCACHED : Number  

UPDATEREADY : Number