update method
Triggers the update of the existing cache. If no updates are available, an update will not be forced.
Syntax
HRESULT retVal = object.update();
Parameters
This method has no parameters.
Return value
Type: HRESULT
This method can return one of these values.
Return code/value | Description |
---|---|
S_OK | |
DOMException.INVALID_STATE_ERR 11 | This exception is thrown if the application cache cannot be found or the IHTMLApplicationCache::status of the cache is IHTMLApplicationCache::onobsolete. |
Exceptions
Exception | Condition |
---|---|
InvalidStateError | This exception is thrown if the application cache cannot be found or the IHTMLApplicationCache::status of the cache is IHTMLApplicationCache::onobsolete. For versions earlier than Internet Explorer 10, INVALID_STATE_ERR is returned. |
Remarks
Use this method and check the IHTMLApplicationCache::status before using IHTMLApplicationCache::swapCache.
The IHTMLApplicationCache::update method returns before the update check is complete, so it is a best practice to wait before checking the IHTMLApplicationCache::status property or calling the IHTMLApplicationCache::swapCache method.
The IHTMLApplicationCache::update method is provided for convenience, but is not necessary for basic functionality. Loading or refreshing the page is sufficient.