Object: ApplicationCache
The ApplicationCache object provides programmatic access to an associated manifest file. The manifest file defines the web resources that the browser must cache so that the web content can function while the BlackBerry device has no network connection. The ApplicationCache object lets you check the status of the manifest to determine whether updated resources are available and need to be downloaded, or whether the latest resources are already cached on the device.
ApplicationCache properties
ApplicationCache constants
|
Constant |
Status value |
Description |
Support level |
Availability |
|---|---|---|---|---|
|
0 |
UNCACHED |
The object is not currently associated with an application cache. |
HTML 5 |
6.0 or later |
|
1 |
IDLE |
The application cache is idle, that is, not in the process of beign updated. |
HTML 5 |
6.0 or later |
|
2 |
CHECKING |
The application cache manifest is being retrieved and checked for updates. |
HTML 5 |
6.0 or later |
|
3 |
DOWNLOADING |
The resources specified in the application cache manifest are being downloaded. |
HTML 5 |
6.0 or later |
|
4 |
UPDATEREADY |
A new version of the application cache is available. |
HTML 5 |
6.0 or later |
|
5 |
OBSOLETE |
The application cache is obsolete. |
HTML 5 |
6.0 or later |
ApplicationCache event handlers
|
Property name |
Type |
Description |
Status |
Availability |
|---|---|---|---|---|
|
Specifies the function to perform when caching of resources defined in the application cache manifest is completed. |
writable |
6.0 or later |
||
|
Specifies the function to perform when retrieving the application cache manifest and checking for updates. |
writable |
6.0 or later |
||
|
Specifies the function to perform when the resources defined in the application cache manifest are being downloaded to the cache. |
writable |
6.0 or later |
||
|
Specifies the function to perform when an error occurs during the caching of resources. |
writable |
6.0 or later |
||
|
Specifies the function to perform when there is no update to download. |
writable |
6.0 or later |
||
|
Specifies the function to perform when the application cache becomes obsolete. |
writable |
6.0 or later |
||
|
Specifies the function to perform periodically while the resources defined in the application cache manifest are being downloaded to the cache. |
writable |
6.0 or later |
||
|
Specifies the function to perform when new resources are available. |
writable |
6.0 or later |
ApplicationCache methods
|
Method name |
Description |
Support level |
Availability |
|---|---|---|---|
|
Adds an EventListener object to a set of event listeners for the application cache. |
DOM 2 Events |
6.0 or later |
|
|
Dispatches an Event object created by Document.createEvent(). |
DOM 2 Events |
6.0 or later |
|
|
Removes an event listener from an EventTarget. |
DOM 2 Events |
6.0 or later |
|
|
Switches to the most recent version of the cache, if it exists. |
HTML 5 |
6.0 or later |
|
|
Begins downloading the application cache resources. |
HTML 5 |
6.0 or later |