Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5947569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:58:57+00:00 2026-05-22T16:58:57+00:00

I’ve seen many posts here on how to get cookies to work inside an

  • 0

I’ve seen many posts here on how to get cookies to work inside an iframe in IE, and I’ve tried several of the solutions, but so far have had no luck. Here’s what I’m dealing with:

  • I have an iframe that is created through Javascript on a customer’s site (a widget.) I have no control of the customer’s site. I need to set cookies to keep the user logged in within the iframe, and it works in Chrome and Firefox, but not in IE 7/8. I haven’t tested IE 6, but I assume it has the same problem.

  • I created a P3P policy using IBM’s policy editor, and the editor said that the compact policy was acceptable under IE’s security, whether it’s set to Low, Medium, or High. The CP I’m using is:

P3P: policyref="/w3c/p3p.xml" CP="CAO DSP COR CURa ADMa DEVa PSAa PSDa CONi TELi OUR IND PHY ONL UNI COM NAV INT DEM CNT PRE" (I have tried several other CPs that people say work, but have seen no difference in the result.)

  • The webserver (NGINX) is serving this P3P header with every file. I am not serving it from code.

  • The p3p.xml file exists and matches the compact policy. The p3p.xml validates using the W3C P3P validator.

  • Even with the P3P header (no matter which one I tried), IE gives me the “evil eye” in the status bar at the bottom and will not let me set cookies. They show as Blocked in the privacy report.

  • I read Piskvor’s post on SO about this topic: Cookie blocked/not saved in IFRAME in Internet Explorer but I have not been able to reproduce what he was able to do on his demo site: http://newmoon.wz.cz/test/page.php?send_p3p=1. I assume this is because I am getting the evil eye and he is not. I have done everything I’ve read about as a recommendation to get rid of th evil yet, yet it persists. Mocking me.

  • My test page is here if you want to try it out: http://truelike.com/js/bobs/frametest.php The set/read pages work fine when viewed outside of the iframe, but don’t work at all inside when using IE.

  • For reference, I’m using PHP on the backend.

Any help at all would be much appreciated – we’re getting desperate here.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:58:57+00:00Added an answer on May 22, 2026 at 4:58 pm

    So, I resolved this myself. It looks like the problem was with NGINX’s HTTPUserIDModule (http://wiki.nginx.org/HttpUserIdModule). I had been using that to send the P3P header, but nginx wasn’t sending the header consistently, perhaps due to this line in their documentation:

    Directive assigns value for the header
    P3P, which will sent together with
    cookie.

    I was seeing the headers come through when checking with curl or lynx, but not when I checked with Firebug or Charles. Perhaps there is a config option to fix this, but I couldn’t find it.

    Anyway, if you pull the header directive OUT of the HTTPUserIdModule and just send the header manually in code, it works. It would probably work if you manually send the header using the HTTPHeadersModule http://wiki.nginx.org/HttpHeadersModule, but I haven’t tested this yet.

    Once it was working through code, I saw that I didn’t need the header on all files – having it only on the files setting/getting cookies was enough, contrary to a lot of the advice I’ve seen.

    Also, my CP was apparently too aggressive, despite IBM’s policy editor saying it was okay. I used a more basic CP, and that worked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to clean up various Word 'smart' characters in user input, including but
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
i want to parse a xhtml file and display in UITableView. what is the
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.