1

My ultimate requirement is to detect if third party is enabled for the client browser because my payment gateway has a different scenario for browsers with disabled third party cookies.

I tried setting up google cookies from within an iframe within my page as below:

<iframe src="http://www.google.com"  frameborder="0" style="border:0; display:none;"></iframe>

and was able to create third party cookies from google.

But I need to confirm "Is it really possible to read third party cookie?" because this way I can confirm that client browser has third party cookie enabled because I could read the cookies which google WAS ABLE to create.

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
sajanyamaha
  • 3,119
  • 2
  • 26
  • 44

1 Answers1

3

You can't read cookies from other sites. If you could, then you could get my login cookie from Google. That would be a horrific security problem.

What you can do is make sure the third party cookie is set by a site that you control and then communicate between the sites to indicate that it was set successfully (e.g. though the postMessage API).

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • @John — But useless to the OP because they can't read the result of their visitors using those tools. – Quentin Apr 08 '19 at 06:41