Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

How to get all the document Cookies?

Post Reply
ForestListener
Posts: 44
Joined: Sun Jul 07, 2019 1:46 pm

How to get all the document Cookies?

Post by ForestListener »

Hello, Salvador.

I have to ask, because i cant figure it out now by myself.

I need to get all the cookies from current Webpage.

I've used Javascript command document.cookie but this command do not retrieve all the Cookies.

For example. Full set of Google com cookies is

Code: Select all

1P_JAR: 2019-11-18-07
ANID: ***
NID: ***
Javascript command document.cookie retrieves only

Code: Select all

1P_JAR: 2019-11-18-07
Is there function to retrieve all the Cookies from opened Webpage.

Thank you!
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to get all the document Cookies?

Post by salvadordf »

Hi,

Call TChromium.VisitAllCookies or TChromium.VisitURLCookies and you will receive the cookies in the TChromiumCore.OnCookiesVisited event.

TChromiumCore.OnCookiesVisited will be triggered several times, one for each cookie. If there are no cookies then it will not be triggered.

The TChromium.OnCookieVisitorDestroyed event will always be triggered when all this process is over.
Post Reply