Page 1 of 1

Re: Cef4 cookies

Posted: Mon Apr 15, 2019 9:48 pm
by salvadordf
Hi,

The CookieVisitor demo shows how to visit, create and delete cookies.

CEF4Delphi uses the SetStoragePath function too to set the new path to store the cookies :
https://github.com/salvadordf/CEF4Delph ... .pas#L1213

I've never tried to change the cookie's path of an existing browser. I don't know if the current CEF binaries support that feature but you can always create a new child browser with a different context and a different path for the cookies.

The MDIBrowser demo has the code to create child browsers with different contexts. All you need is to set a different path for the cache and cookies here :
https://github.com/salvadordf/CEF4Delph ... m.pas#L211

The cache path is the 1st parameter in TCefRequestContextRef.New, and the cookies path is the 4th parameter in Chromium1.CreateBrowser.