Skip to Content
JavaScript: The Definitive Guide, 6th Edition
book

JavaScript: The Definitive Guide, 6th Edition

by David Flanagan
May 2011
Intermediate to advanced
1093 pages
40h 54m
English
O'Reilly Media, Inc.
Content preview from JavaScript: The Definitive Guide, 6th Edition

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 = 0

This application does not have a manifest attribute: it is not cached.

unsigned short IDLE = 1

The manifest has been checked and this application is cached and up-to-date.

unsigned short CHECKING = 2

The browser is currently checking the manifest file.

unsigned short DOWNLOADING = 3

The browser is downloading and caching files listed in the manifest.

unsigned short UPDATEREADY = 4

A new version of the application has been downloaded and cached.

unsigned short OBSOLETE = 5

The 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()

When the status property is UPDATEREADY, the browser is maintaining ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaScript: The Definitive Guide, 5th Edition

JavaScript: The Definitive Guide, 5th Edition

David Flanagan

Publisher Resources

ISBN: 9781449393854Errata PageSupplemental Content