I would like to know if it is possible to obtain information about the host address of the domain from which a cookie was created on my webpage?
I have this sittuation:
- I’am on "domain A", where I have a script linked from "domain B".
- On "domain B" a method is execuded that sets a cookie on my "domain A".
Is there any way to obtain information that the cookie was created from "domain B"?
I need precise information that the cookie originates from "domain B".
2
Answers
I've modified the script above and it seems like I've achieved the desired effect:
And now I'm getting something like this:
Modified answer from here https://stackoverflow.com/a/48185552/2213309
This should print something like the following to the console every time a piece of js code is writing a cookie.
The stack trace can be much longer but the last line should always refer to the initiator script.
The exact output depends on the browser.