Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

onnoupdate

Summary

Indicates the manifest has not changed.

Property of apis/appcache/ApplicationCacheapis/appcache/ApplicationCache

Syntax

var result = window.applicationCache.onnoupdate;
window.applicationCache.onnoupdate = value;

Return Value

Returns an object of type nullnull

Examples

If the currently-cached copy of the manifest is up-to-date, the browser sends a noupdate event to the applicationCache object, and the update process is complete. Note that if you change any cached resources on the server, you must also change the manifest file itself, so that the browser knows it needs to fetch all the resources again.

window.applicationCache.addEventListener('noupdate',function () {
  console.log('The manifest file is up to date');
}, false);

Notes

If there is more than one event, the onupdate event will be the last one in the sequence. Alternatively, you could use an anonymous delegate function such as

object.onnoupdate = function (e) { … }

where e is the cached event.

Attributions

  • Microsoft Developer Network: Article