Just when you think you’ve seen every frustrating browser issue a webmaster can hope to be frustrated by… another is sure to come along.

Recently I got a call from a client that some people were having trouble logging into an alumni database I had built for them. I tested these people’s logins in every browser I had handy and they worked fine. No one else was having problems logging in. So I went to the job site (meatspace, mind you) and sure enough, I couldn’t log in as anyone from two machines, both running IE6. Javascript was enabled. Cookies were enabled. What the heck was going on?

The site uses HTML hosted on a virtual domain at earthlink and database data coming from phpwebhosting.com, all married together in a frameset. Login authentication is handled via PHP sessions.

So why weren’t any logins working from IE6? This one took quite a while to figure out.

First of all, PHP sessions are really just a simplified wrapper for a specialized form of cookie. So start with the realization that cookies aren’t getting planted even though cookies are enabled in the browser.

IE6 has a cookie tolerance slider that defaults to Medium. On the Medium setting,

“Internet Explorer prevents Web sites from storing third-party cookies that do not have a compact privacy policy or that use personally identifiable information without your explicit consent. The browser also prevents Web sites from storing first-party cookies that use personally identifiable information without your implicit consent.”

Compact Privacy Policy? That’s a new one on me. So I look it up. Ah. So now I have to find out how to implement a compact privacy policy. The spec is out there, but I decide not to read the entire thing. CNET has a good overview of what webmasters are going through since IE6 was released.

Finally, I find the deployment answer in a PHP forum. It turns out that this problem affects my site only because it pulls data from two different sources. A user at php.net writes:

“MSIE 6 has an inaccurate definition of third party cookies. If your domain is hosted on one server and your PHP stuff is on another, the IE6 P3P implementation considers any cookies sent from the second machine “third party”. Third party cookies will be blocked automatically in most privacy settings if not accompanied by what MS considers “an appropriate Compact Policy”. In order to make this new piece of tweakable garbage happy I’d suggest you’d par exemple send

header(’P3P: CP=”NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM”‘);

before sending your cookie from your second machine. This header enables your cookie to survive any privacy setting.”

So in the end I went to privacycouncil.com and filled out the wizard, which generated a CPC similar to the one above, and started spitting it back to the browser from the top of the site’s authentication code.

What a huge hassle. And I shudder to think how many sites this going to affect. Mind you, the intention behind it is good. But in practice it’s virtually useless, since you can literally make up the privacy policy - the technology doesn’t have any necessary bearing on ACTUAL company privacy policy. In most cases, the frustrated webmaster is simply going to fill out a wizard like I did and implement a pseudo-accurate privacy policy, rather than taking it to management. So what you’re left with is a lot of hassle and a lot of broken sites, but without any guarantee that user privacy is any better protected than it was.