How to store and retrieve cookies for different contexts?

Having problems with building or using the JCEF Java binding? Ask your questions here.

How to store and retrieve cookies for different contexts?

Postby JohnnyTheHun » Mon Sep 28, 2020 3:14 am

What I want to achieve: have separate browser instances using separate session cookies, and I want to be able to browse and set cookies.
1. First I have to create a new browser with a separate context (I am currently unable to do this but this is the topic of a different thread). But I hope I'll get to this soon.
2. Next I have to be able to browse and set the values for cookies separately for each browser.

To get and set cookies I need access to a CefCookieManager.
Currently the only function I found returning a CefCookieManager is CefCookieManager.getGlobalManager()
But if I have seperate CefBrowser instances with separate CefRequestContexts how do I get and set cookies for each requestcontext separately?
JohnnyTheHun
Techie
 
Posts: 42
Joined: Tue Apr 10, 2018 12:24 pm

Re: How to store and retrieve cookies for different contexts

Postby Strela9 » Tue Oct 27, 2020 9:06 am

I'd be interested in that as well! My team is working on a data gathering/synthesizing task about these residency in Greece https://tranio.com/greece/residence/ rules and laws, and I'd like to keep separately cookies gathered from related searches.
Strela9
Newbie
 
Posts: 5
Joined: Wed Sep 30, 2020 11:43 am

Re: How to store and retrieve cookies for different contexts

Postby JohnnyTheHun » Wed Dec 23, 2020 2:35 am

Could you detail what you mean by "I'd like to keep separately cookies gathered from related searches"
Are there multiple searches running in parallel? And you would like it to work as if they were running in different browsers?
JohnnyTheHun
Techie
 
Posts: 42
Joined: Tue Apr 10, 2018 12:24 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 10 guests