Page 1 of 1

Cookies manual load to CefCookieManager

PostPosted: Wed Jul 11, 2018 4:30 pm
by lolovo
Hi,

I wonder Is it possible to load saved cookies into CefCookieManager correctly by using setCookie() without providing specific url ?

When I do it with url of main site it duplicates cookies (for example, url http://site.com/ was loaded and cookies was saved during site work, when there is a second visit/load of www.site.com these cookies were loaded and set by using setCookie() and url http://site.com/. After second cookie save there are also .site.com cookies appered as well as site.com in saved data. May be there is some wsy for manual loading cookies without specify url , just using parametes of cookie like domain and path and CEF will automatically use these when needed? Or for manual cookie management you need store each url and each cookie for url to use it with setCookie()?

Re: Cookies manual load to CefCookieManager

PostPosted: Thu Jul 12, 2018 11:12 am
by HarmlessDave
Can you explain in more detail what you want to happen or to NOT happen? Also give us specific examples of what happens now and what you want to happen instead.

The way it works right now is how browsers are supposed to work. Cookies set for site.com will be visible to both http://www.site.com and mail.site.com; cookies set for http://www.site.com will NOT be visible to mail.site.com.

If you want to create a function to set a cookie to "site.com" you can have that function use the existing setcookie and create your own URL for it: "http://" + (domain) + "/".