HTML & CSS
I am wondering how Back, Forward browser button works for iframes. Does it bring back/forward iframe or top window?
Usually the back button will cycle back through the various links loaded in the <iframe>, and then back to the previous page once you've reached the first link loaded in the <iframe>, but I don't know if this behaviour is mandated or whether browsers are free to choose whatever model they like.
Perfect timing, I'm having an issue on this one as well. No, facebook does not have any special script to allow iframe back/forward. It's built-in browser functionality. For me, my problem lies in multiple iframe's history. Apparently..at least for Firefox..it has no problem handling just 1 iframe for back/forward.... but when it comes to "multiple" iframe..then it acts very weird!
from above code, it makes you "think" you're using "iframe's" history but it's really not...
See my post for more details...
Most browser built in buttons won't work. You need to right click within the frame to control it. Why do yo need to go back? you may be able to use JS to control the iframe from the main.
That's what I thought too.. maybe it's specific to firefox browser. I was able to get specific reference to multiple iframes on the page... however they all shared the same "history" reference..
window.frames['frameA'].history === window.frames['frameB'].history
so if I browse a bit from frameA and frameB and run
eventually..it'll perform "back" on 'frameB' as well.... at this stage..I'm leaning toward a bug in firefox... wish I was proven wrong.