Cookies manual load to CefCookieManager

Having problems with building or using CEF? This forum is here to help. Please do not post bug reports or feature requests here.

Cookies manual load to CefCookieManager

Postby lolovo » Wed Jul 11, 2018 4:30 pm

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()?
lolovo
Mentor
 
Posts: 67
Joined: Fri Aug 12, 2016 6:11 am

Re: Cookies manual load to CefCookieManager

Postby HarmlessDave » Thu Jul 12, 2018 11:12 am

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) + "/".
HarmlessDave
Expert
 
Posts: 210
Joined: Fri Jul 11, 2014 2:02 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 9 guests