How to clear cookies in CEF3.1547 I have tried the following solution however this simply does nothing. Cookies are still present. Is there a better solution than this?
procedure TForm1.Button1Click(Sender: TObject);
var
CookieManager: ICefCookieManager;
begin
// login to site
CookieManager := TCefCookieManagerRef.GetGlobalManager;
CookieManager.VisitAllCookiesProc(
function(const name, value, domain, path: ustring; secure, httponly,
hasExpires: Boolean; const creation, lastAccess, expires: TDateTime;
count, total: Integer; out deleteCookie: Boolean): Boolean
begin
deleteCookie := True;
ShowMessage('A cookie from domain ' + domain + ' will be unmercifully ' +
'deleted!');
end
);
// visit the site again to see if cookies cleared..
end;
Use this code to delete Cookies from Chromium Version CEF3:
Use c_WB_ClearCookies for deleating all Cookies
Use c_WB_Clear_url_Cookies for deleating all Cookies only from one speceally Url like this -> c_WB_Clear_url_Cookies('http://google.com','cookie_name');
For list all Cookies to get the cookieName use Procedure list_all_cookies