aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Back button behaviour when using an iFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Back button behaviour when using an iFrame" Watch "Back button behaviour when using an iFrame" New topic
Author

Back button behaviour when using an iFrame

Tim Cooke
Bartender

Joined: Mar 28, 2008
Posts: 1173
    
  65

If I have a web page loaded in my browser and that web page contains an iFrame with some other web content in it. What happens when the browser back button is pressed? Will it navigate to the previous page of the iFrame content? Or will it navigate to the previous page of the parent content? Is there consistency or does it depend on what's in focus at the time?

Thanks
Tim


Tim Driven Development
Tim Cooke
Bartender

Joined: Mar 28, 2008
Posts: 1173
    
  65

I figured that given my normal response to speculative questions such as this is along the lines of "Have you tried it? What did you find that happened?", I thought I should take some of my own advice.

So I did.

I found that the back button will navigate back through the iFrame content history. Then once there is no more history in the iFrame content it will navigate back through the history of the parent. I also found that the current focus had no effect on this behaviour.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Back button behaviour when using an iFrame