How to delete cookies?

736 views
Skip to first unread message

Eryk Rak

unread,
Aug 28, 2015, 4:05:36 PM8/28/15
to CefSharp
Can you help me how to delete cookies? I'm using WinForms CefSharp 43.

        CefSharp.Cef.GetGlobalCookieManager.DeleteCookiesAsync(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "WebExpress\user data\Cookies"), "")

This code doesn't work. I don't know what I must to type in name parameter.

Alex Maitland

unread,
Aug 30, 2015, 4:27:05 AM8/30/15
to CefSharp
See https://github.com/cefsharp/CefSharp/blob/master/CefSharp/ICookieManager.cs#L18

Your providing a local path as the first param, when you need to provide the cookie url. If you wish to delete everything then try providing empty string for both params.

You may also need to call FlushStore as well

https://github.com/cefsharp/CefSharp/blob/master/CefSharp/ICookieManager.cs#L60
Reply all
Reply to author
Forward
0 new messages