Description
Clears browsing data in the WebBrowser control.
This function requires Microsoft Edge WebView2 Runtime 102.0.1245.22 or later to work.
Applies to
Syntax
controlname.ClearBrowsingData (BrowsingDataKinds datakinds)
|
Argument |
Description |
|---|---|
|
controlname |
The name of the WebBrowser control from which you want to clear the browsing data |
|
datakinds |
A value of the BrowsingDataKinds enumerated type that specifies the type of browsing data to be cleared. Values are:
|
Return value
Integer.
Returns 1 for success and -1 for failure.
Examples
This example clears all browsing data in the control:
Integer li_ret
li_ret = wb_1.ClearBrowsingData(BrowsingDataKindsAll!)
IF li_ret = 1 THEN
MessageBox("Success", "All browsing data cleared.")
ELSE
MessageBox("Error", "Failed to clear browsing data.")
END IFSee also


