Sunday 27th January 08
Security on the internet is big business. Browser vendors spend a lot of time making sure the browser does everything it can to make the internet a safer place. Sometimes though the moves they make don't seem to actually help anyone.
I recently had the joy of trying to work out how to make IE7 play nicely with cross sub-domain cookies. In particular how to make a "compact privacy policy" for a domain so that we could set cookies under a "Medium" privacy setting (which is the default) and have them available on a different part of our site. This lead me in to a minefield that is P3P.
After a couple of hours reading rather confusing and messy documentation I finally found out all that a compact privacy policy is just a semi-unique header that you have to send when setting a cookie. The next problem is creating your policy. After fruitless searching for an online creator I settled on downloading the IBM P3P Editor.
Once I had added the cookie support and ticked the relevant check-boxes through the maze of property windows I had finally generated our compact privacy policy which looked something like P3P: CP="CAO DSP COR CURa ADMa DEVa CONa OUR LEG UNI" which is code for what our complete privacy policy looks like.
Adding this as a http header at the same time that the cookie is set now makes our cookies work across sub-domains in IE7. So why was that so much hard work? What is wrong with the fact if we set our cookies for .domain.dom we want them to be available on all sub-domains.