I tried it with jQuery:
$.cookie('test', 'value', { expires: 7, path: '/', domain: 'test.com' });
but it won't work.
it's possible to do?
Cookies that are stored and accessed under a specific domain cannot be accessed from a page hosted on another domain. Therefore, the cookie data has to be passed along when leaving one domain and going to the other one.
You can't. The only cookies you can read with client side JavaScript are those belonging to the host of the HTML document in which the <script> is embedded.
Nope, that will not work for security reasons.
It is not possible to do due to security reasons.
if you are in control of the 2nd domain there are some options to share your cookies described already here: What's your favorite cross domain cookie sharing approach?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With