0

Does puppeteer page.cookies() return all cookies including cross-domain ones ?

copenndthagen
  • 49,230
  • 102
  • 290
  • 442
  • no, only for the current page URL. if you need all cookies here it was answered already: https://stackoverflow.com/questions/50252943/puppeteer-get-3rd-party-cookies – theDavidBarton Apr 06 '22 at 22:29
  • Thx...just as a related question, for a regular web app running in Chrome, there is no way to get cross-domain cookies...Would that be correct ? – copenndthagen Apr 07 '22 at 07:29
  • if I mean the same by cross-domain cookies like you (for me it is an interchangeable term with 3rd party cookies here) then, there is a way to get them with `await page._client.send('Network.getAllCookies')`. you can compare its output with `page.cookies()`: this one will contain the 3rd party ones as well. see https://stackoverflow.com/a/60663733/12412595 – theDavidBarton Apr 07 '22 at 12:22

0 Answers0