Reputation: 125
So basically, what I am trying is to build a simple tracker as a method of learning how trackers work. And I stumbled upon my first problem. The scenario is like this:
User loads Domain A, and the JS is loaded successfully. A Set-Cookie (name, value, path, expiration) request is sent by Domain B to the user, which receives it (I checked it). However, it doesn't actually set the cookie in the browser. I tried to do the same but everything in the same domain and works, so the problem is that they're different domains.
What is the best workaround for this? Using iframes, maybe? Setting the cookie from the JS reading the response from the server?
Upvotes: 1
Views: 410
Reputation: 2416
Toss this in your http headers
P3P CP="NOI COR NID CUR OUR NOR"
P3P is the key, the rest is the value
And you'll propably want to brush up on what P3P actually is http://www.w3.org/P3P/
or just google "P3P"
In this thread they say P3P is dead ..but it will still work on IE. Don't know where chrome & FF stand on this issue. Any recommendation for p3p policy editor?
Upvotes: 1