HTML and CSS Reference
In-Depth Information
Event name
Description
The manifest or one of the resources in it was not found, or the manifest changed while
the update was in progress, or some other error has occurred, so caching has been can-
celed.
error
Table B.3 lists the DOM attributes and methods for offline applications. All apply to the
application cache object itself, apart from the ones where an explicit root object is listed.
Table B.3. Application cache API
Attribute/method
Description
window.applicationCache
Returns an application cache object for the active document.
self.applicationCache
Returns an application cache object for a shared worker.
Gets the current status of the cache:
• UNCACHED (numeric value: 0)
• IDLE (1)
• CHECKING (2)
• DOWNLOADING (3)
• UPDATEREADY (4)
• OBSOLETE (5)
status
update()
Starts downloading resources into a new application cache.
abort()
Cancels downloading of resources.
swapCache()
Switches to the newest application cache, if a newer one is available.
The Browser State API is covered in table B.4 , though this is less useful than you might
think. Deciding whether the browser is online isn't the same thing as being able to connect
to the internet or your application. It's merely a reflection of the browser's online mode.
Table B.4. Browser State attributes and events
Attribute/method, event name
Description
window.navigator.onLine
Checks if the browser mode is online (returns true) or offline (returns false).
online
The browser's online status has changed to online.
offline
The browser's online status has changed to offline.
 
 
Search WWH ::




Custom Search