Click or drag to resize

AsyncExtensionsDeleteCookiesAsync Method

Version 101.0.180
Deletes all cookies that matches all the provided parameters asynchronously. If both url and name are empty, all cookies will be deleted.

Namespace:  CefSharp
Assembly:  CefSharp (in CefSharp.dll) Version: 101.0.180.0 (101.0.180.0)
Syntax
public static Task<int> DeleteCookiesAsync(
	this ICookieManager cookieManager,
	string url = null,
	string name = null
)

Parameters

cookieManager
Type: CefSharpICookieManager
cookie manager
url (Optional)
Type: SystemString
The cookie URL. If an empty string is provided, any URL will be matched.
name (Optional)
Type: SystemString
The name of the cookie. If an empty string is provided, any URL will be matched.

Return Value

Type: TaskInt32
Returns -1 if a non-empty invalid URL is specified, or if cookies cannot be accessed; otherwise, a task that represents the delete operation. The value of the TResult will be the number of cookies that were deleted or -1 if unknown.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ICookieManager. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also