ClearHistory Method  
 

Clears the browser navigation history, resetting the ability to go back or forward.

Syntax

object.ClearHistory

Parameters

None.

Return Value

Returns True if the method succeeds or False if the method fails.

Remarks

This method clears both the profile's stored browsing history and the navigation history for the current WebView instance. Internally, it uses the WebView2 profile APIs to remove stored history and related download entries, and then resets the back/forward navigation stack. The effect is similar to selecting clearing the browser history in a browser, where visited pages are removed from the user's history, and the in-memory list of sites you can go back or forward to is discarded.

See Also

ClearCache Method, ClearCookies Method, ClearHeaders Method, DataFolder Property, InPrivate Property