views:

130

answers:

6

I wrote a simple pixel tracking program that works something like this

Step 1) tracker.com sets a cookie
Step 2) mysite.com displays <img src="tracker.com/tracking.php">. That image reads the cookie from Step 1 & does some processing.

Works great in Chrome, Firefox and Safari. But when tested in IE, the cookie can't be read in Step 2. It's as if the cookie doesn't exist -- but I know it does.

Any idea why IE pretends the cookie doesn't exist? I've tried messing with P3P headers, no luck.

A: 

Try adding the domain in the src attribute to trusted sites in IE. My guess is this is security, and you've got a rather arcane security measure you're coming up against.

Fred
Just tried that, IE still tells me the cookie doesn't exist.
MikeMorales
Wait -- my fault. Yeah, I tried that and it works. Now if only I can figure out how to make it trusted for everyone else..
MikeMorales
A: 

If the cookie setting domain is 2 letters, I believe there is a bug within IE that prevents IE from doing cookies properly with 2 letter domains. If it isn't 2 letters, then nevermind.

anonymous
It's a 5-letter domain. The domain does have a numerical digit in it, if that means anything.
MikeMorales
A: 

So, the first answer was more about testing... try using JS to handle this -

From site-reference.com forums..

var track = new Image(); track.src="http://www.my-site.com/tracker.php?self=" + this.location;

*NOTE: Capital "I" in image, not lowercase!

Let us know! :D

Fred

Fred
I thought that might work. Tried it, didn't.
MikeMorales
A: 

It may be that IE is blocking 3rd-party cookies.

Andrew Cooper
Seems that way. Funny, I'm only trying to read a 3rd-party (or cross domain) cookie, not write one. :(
MikeMorales
I think IE blocks it either way, unless you turn off that option.
Andrew Cooper
A: 

Its tricky without knowing more specifics of its use, but I'm trying at this late hour to figure out how to clone the cookie for the current domain using REMOTE_ADDR

Fred
A: 

Does your domain have a privacy policy? I forget what it's called, maybe p3p? Some random list of headers that you have to add.

Kevin McCarthy