Hi guys, exist some way to put 2 browsers in a page control but with cookies session separated?
I need log-in in same site but in 2 different accounts.
Thanks for some help
Alexandre
Brazil
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Browsers with cookies session separated
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Browsers with cookies session separated
Hi,
Yes, the MDIBrowser demo can do that.
By default, all browsers share the same "context". That means that all of them share the cache and cookies.
You need to create a new "context" for each independent browser. Each context can be created using a different cache directory or in memory, leaving the cache parameter blank.
Yes, the MDIBrowser demo can do that.
By default, all browsers share the same "context". That means that all of them share the cache and cookies.
You need to create a new "context" for each independent browser. Each context can be created using a different cache directory or in memory, leaving the cache parameter blank.
-
- Posts: 52
- Joined: Sat Dec 09, 2017 4:40 pm
Re: Browsers with cookies session separated
Hi, thanks, but MDIBrowser demo dont works here, the browser dont appears the windows stay blank.
Some idea?
Some idea?
-
- Posts: 52
- Joined: Sat Dec 09, 2017 4:40 pm
Re: Browsers with cookies session separated
OK, I do this: TempContext := TCefRequestContextRef.New('', '', False, False, False, False);
Works well, but how set the context to uses the cache path configured in GlobalCEFApp.cache?
Works well, but how set the context to uses the cache path configured in GlobalCEFApp.cache?
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Browsers with cookies session separated
Sorry. I left some test code by mistake.alpires2000 wrote: Wed Dec 13, 2017 3:17 pm Hi, thanks, but MDIBrowser demo dont works here, the browser dont appears the windows stay blank.
Some idea?

Please download CEF4Delphi again.
The first parameter in TCefRequestContextRef.New is the cache directory but if you want them to share the cache you shouldn't create a different context.alpires2000 wrote: Wed Dec 13, 2017 3:48 pm OK, I do this: TempContext := TCefRequestContextRef.New('', '', False, False, False, False);
Works well, but how set the context to uses the cache path configured in GlobalCEFApp.cache?