I understand that client-side first party cookies refer to cookies created on the page being browsed using document.cookie. However, I'm having trouble understanding client-side third party cookies. Is this conceptually possible but not practically, as when I try to specify a different domain using the domain parameter with document.cookie, the browser doesn't save the cookie? Is my understanding correct?
- 2Related: When is a cookie considered to be a third party cookie? | How do Third-Party "tracking cookies" work? | Regarding third-party cookies, who is a "second party"? | How I can set third party cookieVLAZ– VLAZ2023-10-28 12:45:01 +00:00Commented Oct 28, 2023 at 12:45
Add a comment |
1 Answer
Yes.
Third-party cookies can only be set by set-cookie HTTP response headers (or upon visits to the other site at which time they would be first-party cookies).
Client-side JS has no direct access to them, for reading or writing, via document.cookie or otherwise.
1 Comment
shinyatk
Thank you very much! I had this question for a long time and now it's much clearer!