This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
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?
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.
subject: Back button behaviour when using an iFrame