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/value | Description |
|---|---|
| |
|
This exception is thrown if the application cache cannot be found or the status of the cache is obsolete. |
Exceptions
| Exception | Condition |
|---|---|
|
This exception is thrown if the application cache cannot be found or the status of the cache is obsolete. For versions earlier than Internet Explorer 10, 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
