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

Discussion in 'JavaScript' 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 line html code only.

    View attachment 83019 (0.5 kb only)

    or here is 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. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #2
    You should just link to an example on your web host. Noone really wants to download a file and extract it to help you out no offense.

    Personally I would stay clear from any type of frames... including iframes.
     
    NetStar, May 29, 2012 IP
  3. KingCobra

    KingCobra Well-Known Member

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

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #4
    Missing closing iframe tag.
     
    NetStar, May 30, 2012 IP
  5. KingCobra

    KingCobra Well-Known Member

    Messages:
    289
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #5
    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