WebViewReloadDocument Function  
 
BOOL WINAPI WebViewReloadDocument(
  HWND hWndHost,  
  BOOL bClearCache  
);

The WebViewReloadDocument function reloads the current document and optionally clears the cache.

Parameters

hWndHost
Handle to the window attached to the browser session.
bClearCache
An integer which indicates if the document cache for the session should be cleared. A non-zero value specifies the cache should be cleared; zero specifies the cache should not be cleared.

Return Value

If the function succeeds, the return value is non-zero. If the function fails, the return value is zero. To get extended error information, call WebViewGetLastError.

Remarks

The WebViewReloadDocument function refreshes the currently loaded page, similar to pressing F5 in a web browser. If the bClearCache parameter is non-zero, the document cache is also cleared before reloading, ensuring that all resources are fetched again from the server instead of being served from the local cache.

This function is generally preferred over WebViewRedrawWindow when an application only needs to reload the content without forcing the host window and browser control to repaint. It provides a lightweight way to refresh the page and optionally reset cached resources, without the overhead of a full redraw of the hosting window.

An application would typically use this function in response to a user action or when it needs to ensure the latest version of a document is displayed after cached data may have become stale.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: cshtmv12.lib

See Also