Welcome Guest Search | Active Topics | Sign In | Register

Browser Engines and Sharing Cookies Options
Apex Networks Ltd.
Posted: Tuesday, November 17, 2015 9:25:38 AM

Rank: Advanced Member
Groups: Member

Joined: 5/8/2015
Posts: 46
Hi,

I noticed you implemented the ability to have multiple engines in the browser recently, great stuff.

I am looking for [sort of] the reverse of this, the ability to share cookies between applications. An example is where we have a single application containing a form with a browser control. The user launches the application and logs in to a website which sets a cookie identifying that user. The user then opens a second instance of our application and navigates to the same login page and logs in which sets the cookie again (same cookie name as the first one). The user should remain logged into the website in both applications.

Months back we detailed the same requirements to yourselves and was told it wasn't possible at that time, so we coded round this and wrote our own cookie storage that was shared between all instances of our application, not ideal but it worked.

Just wondering if you were any closer to providing a solution that doesn't require us to manage the cookie storage ourselves, as just running two instances of Chrome on it's own works correctly.

Regards,
Andy
Apex Networks Ltd.
Posted: Tuesday, November 17, 2015 9:33:23 AM

Rank: Advanced Member
Groups: Member

Joined: 5/8/2015
Posts: 46
Here's your response from May for reference!!!:

Hi,

We have just replied your email on this issue. The reason that the normal Chrome browser works fine is because they use a single "browser" process. Chrome has a multiple process architecture that uses different child processes for different tasks. There is a separate process for each site and there is a single "browser" process that handles network traffic and also coordinates between other processes. For Chrome browser, no matter how many browser window you open, it always share a single "browser" process. Cookies are managed by the browser process. Since there is only one browser process no matter how many windows you open, so there will be no problem on cookie sharing.

In our current implementation we have the same model --- except that we have one browser process per your application instance. We plan to make this configurable so once that is done you will be able to share cookies.

Thanks!
eo_support
Posted: Tuesday, November 17, 2015 11:29:25 AM
Rank: Administration
Groups: Administration

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

We did look into this and we do not see significant practical benefit of using multiple process to share a single browser engine, even though it is technical achievable. This is because the actual works are already done by child processes, either all your WebViews are in the same process or in different processes through a shared engine. So for example, if your page runs into out of memory exception when all WebViews are in a single process, most likely you will run into out of memory exception even if you split them into multiple processes --- this is because the page itself is already running inside its own process no matter you share an engine or not. This means the out of memory problem originates from that child process, not from your process. As such spliting your process into multiple processes will not solve such problems for you. So there is no plus side of doing so.

On the down side, allowing multiple process to share a single browser engine would add unnecessary complexity to the code. There are also limitations on how far you can go on "sharing". For example, you would not be able to share an engine between different sessions from different users due to the fact that there are security boundary between them.

Because there is no plus side and significant down side to do so, we have decided against supporting it.

Thanks!


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.