Welcome Guest Search | Active Topics | Sign In | Register

Sharing cookies between browser engines Options
James
Posted: Wednesday, September 13, 2017 2:41:11 PM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2015
Posts: 122
My application uses multiple processes to improve general performance of the platform.
In this scenario, each process may contain its own browser engine if it is using web based elements.

We have a scenario where two different processes may want to use cookies the other has saved into its web domain, however even though the CachePath is set to the same folder, we don't share the cookies.

Is there any support for sharing cookies between the browser engines, or perhaps the ability to use a single browser engine in a core process and provide webview processes to the child processes?
eo_support
Posted: Thursday, September 14, 2017 11:17:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,258
Hi,

There is no way you can share cookies between multiple processes. Even Chrome browser uses the same browser process in order to properly sharing cookies. So attempting sharing cookies while using multiple processes is a dead end and you must change that.

The only way to share cookies is to either use the same Engine instance (which requires everything to be in the same process), or you can restart application using the same cache path --- either case would allow you to share cookies among multiple concurrent processes.

Thanks!
James
Posted: Thursday, September 14, 2017 11:36:22 AM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2015
Posts: 122
I already use the same cache path and the cookies do not show up in additional processes.
eo_support
Posted: Thursday, September 14, 2017 11:47:19 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,258
I've already explained to you that you can not use "additional process". That's a dead end with no way out.

What I meant by the same cache path is, if you have the same process that runs once (session A), close it, then run it again (session B). In this case if you want session B to pick up cookies saved by session A, you must make sure they use the same cache path in both sessions. So for example, randomly creating a temp folder and using that folder as cache path when your application starts would be a sure way to make it to lose all cookies every time you restart your application.

As you can see, there are no additional process running at any given time. At any given time there is maximum one single process running.
James
Posted: Thursday, September 14, 2017 11:51:29 AM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2015
Posts: 122
Everyone already knows that you can and how you do persist cookies between sessions, completely unrelated topic.
Thanks for the information, I'll have to build a solution around the limitations of EO to provide cookie sharing.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.