Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Call Cookie Functions In Iframe

Recommended Posts

I have got a page with an iframe. The iframe contains the cookie functions.How do I access the cookie functions from the iframe?When I do the following <a href="Common.htm" onClick="javascript:window.frames.["FrameData"].CreateCookie('CookieTrackMain','A.htm',7);">Common</a>I get the error 'Expected identifier'.What is the solution?

Share this post


Link to post
Share on other sites

I don't know what the problem is but I'd just like to say that I think it's a bad idea to call a cookie in an iframe. IE6 and maybe even earlier versions and of different browsers will block cookies in an iframe as they'll see it as a security threat.Oh well. Just a suggestion.

Share this post


Link to post
Share on other sites
Replying to electriic ink This guy is asking a decent question and you have to knock him down a level. Yes it is a security threat, but he doesn't know that. For someone who doesn't know this, where is he suppose to find out? Not here - because some jerk is going to make him look like a dufus. Next time - can you please respond like this:This is possible because its a security threat. IE6 and maybe even earlier versions and of different browsers will block cookies in an iframe as they'll see it as a security threat.Thanks,-reply by Chris

Share this post


Link to post
Share on other sites

third party cookies in iframeCall Cookie Functions In Iframe

Some browsers allow third party cookies and in some browsers, like Internet Explorer,

it depends on the privacySettings of the browser. In IE6 (Internet Explorer 6) with the

default privacy setting of �Medium�, third partyCookies will be deleted.

 

As it turns out, there is a simple solution. If you supply a �compact privacy policy� with your page, then IEWill 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: viralpatel.net/blogs/2008/12/how-to-set-third-party-cookies-with-iframe.Html

-reply by ask2gaurav

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.