meee — 2011-01-24T20:52:49-05:00 — #1
I am wondering how Back, Forward browser button works for iframes. Does it bring back/forward iframe or top window?
stevie_d — 2011-01-25T07:12:58-05:00 — #2
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.
sg707 — 2011-02-02T15:52:25-05:00 — #3
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...
rguy84 — 2011-02-02T16:12:20-05:00 — #4
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.
sg707 — 2011-02-03T09:58:43-05:00 — #5
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.