1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

iframe cookie issue.

Discussion in 'PHP' started by leouser, Nov 19, 2007.

  1. leouser

    leouser New Member

    Joined:
    Nov 19, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Here is the scenario:
    1. Clear your IE cash and cookies.
    2. Go to tutorial-index.com
    3. You will see that the site recorded you a tutorial-index cookie.
    4. Clear the cookies and cash again.
    5. Create HTM file and put the following code in it:
    <html xmlns='http://www.w3.org/1999/xhtml' >
    <head><title></title></head>
    <body><iframe src="http://www.tutorial-index.com" height="1000" width="1000"></iframe></body>
    </html>
    6. Run just created file.
    7. Now check your cookie folder. RESULT: no cookie.

    I've been fighting with this iFrame vs. cookie issue for over 2 days. I cannot pinpoint the problem. Anyone can explain to me why it's happening and how I can fix the issue?
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    You file main HTML page is on a different domain and the iframe src HTML is from a different domain, by thumb rule a domain cannot access the cookies of another domain. Also, what browser are you using??
     

Share This Page