Forum Moderators: open

Message Too Old, No Replies

Set cookie from external javascript on different domain

Is it possible?

         

jacquex

1:57 pm on May 2, 2005 (gmt 0)

10+ Year Member



I have two domains, DomainA and DomainB. I have an external javascript located on DomainB. This js sets a cookie for DomainB. If I call the external js from a page on DomainB, the cookie is set correctly. However, if I call it from DomainA no cookies are set.

I understand that a cookie can be set only for the domain which is setting it, but isn't the fact that the javascript is located on DomainB enough to allow the cookie to be set? Is there any way that this can be done (Page on DomainA invokes js on DomainB which sets a cookie for DomainB)?

Any pointers would be greatly appreciated.

gph

9:36 pm on May 2, 2005 (gmt 0)

10+ Year Member



No, the javascript is embedded in the page. The URL of the page is the only thing relevant to the browser