ClearCookies Method  
 

Removes all cookies or only session cookies stored by the current WebView profile.

Syntax

object.ClearCookies( [AllCookies] )

Parameters

AllCookies
A boolean parameter which specifies which cookies should be removed. If True, all cookies for the current profile will be removed. If False, only the current session cookies will be removed.

Return Value

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

Remarks

This method deletes cookies that have been created by the current WebView profile. If the AllCookies parameter is True, all stored cookies for every site are removed; if False, only the cookies associated with the current session are cleared. The effect is comparable to clearing cookies in a regular browser: login sessions, preferences, and other state information stored in cookies will no longer be available. This only affects the WebView's private user data folder and does not modify cookies stored by the user's standalone Edge browser.

If you have used the WebView browser to authenticate with one or more websites, calling this method will typically log you out of those sites and require you to re-authenticate. If you have created the browser instance using a temporary data folder, or you set the InPrivate property to True, no cookies will be preserved after the session ends.

See Also

ClearCache Method, ClearHeaders Method, ClearHistory Method, DataFolder Property, InPrivate Property