1

Is it possible to use a cookie file when oppening a chromium browser. Now all data of browser is saved under directory set with user-data-dir flag. One of those things is also Cookies file. I would like to get all cookies, save them in a file and when oppening a new browser, I would like to tell the browser to use those cookies.

Fetching all cookies I use this library: https://github.com/cyrus-and/chrome-remote-interface

I read that there is a flag called enable-file-cookies, but I cannot get it to work with it. As I understand, this flag doesnt work anymore.

What type of file, do we need to set as a Cookie file?

puppeteer701
  • 1,225
  • 3
  • 17
  • 33
  • Do you guys think that I could set all cookies that get from the API with document.cookie = "";?? – puppeteer701 Aug 18 '16 at 15:26
  • Cookies are key value pairs (with some optional additional info added on, like the expiry date). To set more than one, you just set document.cookie more than once. The ; separator is used to specify the additional info, not to add more different cookies. Got it - thx @crimson_penguin – puppeteer701 Aug 18 '16 at 15:28

0 Answers0