Having got an on-pageload fancybox iframe working (see here), I discover that the set-up produces very different responses to browser back-buttons (a problem that goes way back to the good ol' frameset
days). If you start here, on Page 1:
...and go to Page 2, you'll see the starting iframe (which is generated onload from code in Page 2). If you open the link in that iframe, a new document opens in the iframe. Click/touch your back-button, to reload the starting iframe. In testing, browser behaviour is as follows...
PC Windows 7
- Firefox 33 - semi-successful - starting iframe reappears. However, a further click on the back-button produces the starting iframe with no content (iframe blank)
- Chrome 38 - fails - starting iframe reappears but is blank, content reappears on reload
- IE 11 - successful - starting iframe re-appears, further click on back-button goes to Page 1 (best result!)
iPad
- Safari - fails - starting iframe reappears but is blank, content reappears on reload
- Opera mini - fails - same as Safari
- Chrome - double-fails - goes straight back to back to Page 1
With so many different responses, I doubt there is a solution for all browsers. But maybe someone out there can help.