Forums » Developers
iFrame and third party cookies
As the Clicky documentation states in order to use the iFrame functionality the user needs to have third party cookies turned on. As it also states IE7 has them off by default.Due to browser cross site security, it is not possible (as far as I know) for code that embeds the iFrame to inspect the iFrame's data after it's loaded to determine whether or not the user is viewing the statistics data or an error page.
If there *is* a way, please let me know and then ignore the rest of this post. :) If not, read on.
I'm wondering if it would be possible for you (the Clicky devs) to put some javascript into the Clicky page to detect whether the browser has the appropriate cookie and, if not, display an error. Something like:
[code]
document.cookie = "ClickyCookie=yes;";
if ( document.cookie.indexOf( "ClickyCookie=" ) == -1 ) {
document.write( "You do not 3rd party cookies enabled" );
} else {
// Proceed normally.
}
[/code]
Pat
Posted Fri Jul 11 2008 8:34am by innovectra
I tried to implement this this morning but it's a lot more complicated than it sounds. I couldn't get it working.
What we need to do is get a compact privacy policy in place so MSIE's default settings allow third party cookies. I'll try to do that today.
Posted Mon Jul 14 2008 9:03am by Your Friendly Clicky Admin
I got the compact privacy policy working, which will now allow all versions of MSIE to use third party cookies with our domain, even on the highest security setting. This should fix the issue for almost everyone who was having problems before.
Posted Mon Jul 14 2008 1:42pm by Your Friendly Clicky Admin
This will do nicely, thank you.
As a note, I've recommended to management to upgrade our trial account. I appreciate all your support.
Pat
Posted Thu Jul 17 2008 6:17am by innovectra
Just set P3P (Platform for Privacy Preferences Project) header.
The code for ASP.Net
HttpContext.Current.Response.AddHeader("p3p", "CP=""IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT""")
The code for PHP
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
For more information visit following url:
http://www.viralpatel.net/blogs/2008/12/how-to-set-third-party-cookies-with-iframe.html
Posted Mon Dec 15 2008 3:02am by ask2gaurav
Some browsers allow third party cookies and in some browsers, like Internet Explorer, it depends on the privacy
settings of the browser. In IE6 (Internet Explorer 6) with the default privacy setting of ‘Medium’, third party
cookies will be deleted.
As it turns out, there is a simple solution. If you supply a ‘compact privacy policy’ with your page, then IE
will treat the cookies with respect and let them through.
ASP.Net code
HttpContext.Current.Response.AddHeader("p3p", "CP=""IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT""")
PhP code
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
For more information on this, please visit this url:
http://viralpatel.net/blogs/2008/12/how-to-set-third-party-cookies-with-iframe.html
Posted Tue Dec 23 2008 1:15am by ask2gaurav
Do these headers go on the framing site, or the site within the iframe?
Posted Fri Feb 5 2010 2:55pm by daryn
The site inside the frame.
Posted Fri Feb 5 2010 3:51pm by Your Friendly Clicky Admin
