While using our new Share-It iframe for a project we came across a strange session issue with internet explorer that was tough to track down a solution to.
Basically we were loading an iframe with some parameters that were saved in a session, this worked fine on all browsers except for internet explorer.
Every request had a new session id, so the issue had to be with the cookies. As it turns out using an iframe from a different domain name is considered "third-party" and IE blocks the cookies unless....
You set this ( P3P compact policy ) response header.
P3P: CP="CAO PSA OUR"
more details about the header and what it means can be found here.
you can easily do this in a controller using this call in a before filter with this line:
response.headers['P3P'] = 'CP="CAO PSA OUR"
Since the issue was harder to find a solution to than it should have been we decided it would make a good first development post from the Sympact team. Expect More...


Thanks - this post definitely saved me some time.
One small thing though. You are missing the closing single quote at the end of the line:
response.headers['P3P'] = 'CP="CAO PSA OUR"'
Posted by: Geoff | September 29, 2008 at 06:52 AM
Many Thanks. It works and saved me a lot of headaches.
Posted by: Juan Manuel | January 14, 2009 at 05:31 AM
Thanks for posting this fix, I could have spent many hours trying to figure out why IE differs from every other browser in one more way, but I found this in just a few minutes. Moving on to the next IE bug.
Posted by: Dustin DeYoung | April 22, 2009 at 09:03 AM
Oh man I can't thank you enough!!
My app ran on every browser locally and on everything but ie when deployed. Wow that was annoying!
Your fix worked perfectly. Many many thanks!!!
Posted by: David | April 27, 2009 at 02:55 AM
Wow, what terrible behavior from IE.
Thank you for posting your experience with the problem and this fix, it worked for us. This would have probably taken hours to figure out if not for our finding your post.
Posted by: twitter.com/phinze | September 14, 2009 at 04:52 PM