update method

Triggers the update of the existing cache. If no updates are available, an update will not be forced.

Syntax

var retval = ApplicationCache.update();

Parameters

This method has no parameters.

Return value

Type: HRESULT

This method can return one of these values.

Return code/valueDescription
S_OK
DOMException.INVALID_STATE_ERR
11

This exception is thrown if the application cache cannot be found or the status of the cache is obsolete.

 

Exceptions

ExceptionCondition
InvalidStateError

This exception is thrown if the application cache cannot be found or the status of the cache is obsolete. For versions earlier than a Windows Store app using JavaScript, INVALID_STATE_ERR is returned.

Remarks

Use this method and check the status before using swapCache.

The update method returns before the update check is complete, so it is a best practice to wait before checking the status property or calling the swapCache method.

The update method is provided for convenience, but is not necessary for basic functionality. Loading or refreshing the page is sufficient.

See also

ApplicationCache

 

 

Show:
© 2014 Microsoft