iFrame page loading again on click of browser back button - please help

Discussion in 'HTML & Website Design' started by KingCobra, May 29, 2012.

  1. #1
    Dear friends,

    I have a page with iFrame. The problem is (in firefox & chrome) when I press browser back button then most of times the whole page reload inside iFrame.

    Here is the 2 html files (zip format). Total 5 lines html code only.

    View attachment html.zip

    or visit the live test site:

    http://tinyurl.com/cbrt6mb

    To view my problem:

    Please download this files and upload to your server.
    Open the index.htm
    Click on 'Iframe page'
    (after loading iframe page)
    Click on browser back button once.
    You may see whle page loading again inside iFrame.

    This is the problem. I need to go back previous index.htm page and not iframe inside iframe.

    Please help me. Thanks
     
    Last edited: May 29, 2012
    KingCobra, May 29, 2012 IP
  2. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #2
    KingCobra, May 29, 2012 IP
  3. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #3
    You must of cross posted this. I answered it. You need to include a closing iframe tag.
     
    NetStar, May 30, 2012 IP
  4. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #4
    Dear NetStar,

    I didn't miss the </iframe> at the end. Please see the source carefully (on live link that I provided previous post). There is closing tag presented.

    <iframe marginWidth=0 marginHeight=0 src="my-site-url-here" frameBorder=0 width=100% height=100% style='overflow:scroll;height:100%;width:100%;position:relative;top:0px;left:0px;right:0px;bottom:0px;' scrolling='auto'></iframe>

    Thanks
     
    KingCobra, May 30, 2012 IP
  5. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #5
    Amazing!!! where you finding that i am not using closing iframe? But I used </iframe> at the end.

    <iframe marginWidth=0 marginHeight=0 src="my-site-url-here" frameBorder=0 width=100% height=100% style='overflow:scroll;height:100%;width:100%;position:relative;top:0px;left:0px;right:0px;bottom:0px;' scrolling='auto'></iframe>
     
    KingCobra, May 30, 2012 IP