Back,forward browser button for iframe

I am wondering how Back, Forward browser button works for iframes. Does it bring back/forward iframe or top window?

I remember I had before a problem because I wanted to bring back iframe and not top window as it did. But today I tested my Facebook app and was surprised to see it works as I need which means it brings back/forward iframe window and not top. Is it possible that Facebook has some javascript code which does that or is this normall behaviour?

Thank you

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!

you can do this in javascript by

window.frames[‘frameA’].history.go(-1);

from above code, it makes you “think” you’re using “iframe’s” history but it’s really not…

See my post for more details…

Help Plz!!!

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…

for example

window.frames[‘frameA’].history === window.frames[‘frameB’].history

so if I browse a bit from frameA and frameB and run

window.frames[‘frameA’].history.go(-1)
window.frames[‘frameA’].history.go(-1)
window.frames[‘frameA’].history.go(-1)

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.