Hi i have a web application where i plant a cookie on my page. Then the user goes to another page, and from that page calls my page from a script, like this:
<script type="text/javascript" src="http://domain.com/page.aspx?id=6" ></script>
But i cant access the cookie when it calls my page, why not? and how to work around it?
Please note that this question is in relation to: Javascript and webshop tracking/affiliate across websites, how to do?
Edit The "other" page is on a entirely different domain. My code is in ASP.NET, but as far as i know its the same for all languages:
Planting the cookie (Default.aspx):
protected void Page_Load(object sender, EventArgs e)
{
Response.Cookies["affiliate"].Value = "InnovationPartner";
Response.Cookies["affiliate"].Expires = DateTime.Now.AddDays(7);
...
}
Retrieving the cookie (after round-trip) (Collect.aspx):
protected void Page_Load(object sender, EventArgs e)
{
bool affiliate = Request.Cookies["affiliate"] != null ? true : false;
...
}