Rank: Newbie Groups: Member
Joined: 1/15/2018 Posts: 1
|
Hi,
Are there's anyway to manipulate the cookie when opening the EO browser?
Our scenario is like below:
1. process1 will do some work, http request, and then get some response with cookies. 2. process1 start EO browser, and using Eval to put the cookie got from 1st step to document.cookie.
The issue is that there are some race in the javascript and some logic will work before the Eval. Are there any way to set the cookie instead of Eval? like some API that operate the cookie directly.
Thanks Jerry
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,221
|
Hi,
Using EvalScript to set document.cookies is probably is the easiest way. There are other ways to set cookies indirectly, for example, you can use a custom resource handler to handle the HTTP request completely yourself and attach cookies there, but it will be too overkill for this purpose. So if you run into issues with EvalScript, I believe the focus should be resolving those issues instead.
Thanks!
|