I have a page which contains an iframe and I want to track the history of the iframe only. I tried to use the history object like this:
There is an easy way to do this, provided of course that the iframe content is the same domain.
From the parent you bind to the beforeUnload or the load event of the iframe's window object. In the event's callback handler you simply do something along the lines of locations.push(getElementById("iframe").contentWindow.location.href) where locations is of course a previously defined array in the parent scope.