If I load a JS file from a different domain, the browser requests it via
HTTP, so I assume it sends any relevant cookie headers for that domain;
why then can I not access them? E.g. suppose I have this in a file on
domain1.com:
<SCRIPT TYPE="text/javascript" src="http://www.domain2.com/cookie.js">
</SCRIPT>
and in cookie.js I have
alert(document. cookie);
It seems to me it should show me the cookies for domain2, no? But it
shows me the cookies for domain1. Is there a way to get it to do what I
want?
--
Alan Little
Phorm PHP Form Processor
HTTP, so I assume it sends any relevant cookie headers for that domain;
why then can I not access them? E.g. suppose I have this in a file on
domain1.com:
<SCRIPT TYPE="text/javascript" src="http://www.domain2.com/cookie.js">
</SCRIPT>
and in cookie.js I have
alert(document. cookie);
It seems to me it should show me the cookies for domain2, no? But it
shows me the cookies for domain1. Is there a way to get it to do what I
want?
--
Alan Little
Phorm PHP Form Processor
Comment