The ApplicationCache object’s cache host is associated with an application cache whose application cache group’s update status is idle, and whose application cache group is not marked as obsolete, but that application cache is not the newest cache in its group.
Property of apis/appcache/ApplicationCacheapis/appcache/ApplicationCache
Syntaxvar result = window.applicationCache.onupdateready;
window.applicationCache.onupdateready = value;
Return Value
Returns an object of type nullnull
ExamplesChecking fo the updateready status
window.applicationCache.update();
if (window.applicationCache.status === window.applicationCache.UPDATEREADY) {
console.log('Cache is now ready for an update');
window.applicationCache.swapCache();
}
Listening for updateready events
window.applicationCache.addEventListener('updateready',function () {
console.log('The manifest update download has been completed successfully');
}, false);
Notes
If this event indicates that the resources have been redownloaded, the script can use swapCache to switch to the new cache. If there is more than one event, the updateready event will be the last one in the sequence. Alternatively, you could use an anonymous delegate function such as
object.onupdateready = function (e) { … }
where e is the cached event.
Related specificationsMicrosoft Developer Network: Article
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4