Track only iframe history

后端 未结 6 722
囚心锁ツ
囚心锁ツ 2021-01-13 06:06

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:



        
6条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-13 06:36

    Chrome manages history on window base; not on separate frames. This behaviour is probably the cause of your problem.

    Dont know if its default behaviour for all browsers btw.

    Edit: You have to maintain your navigationhistory server side. Keeping an array on the mainwindow, as stated in another answer, doesnt work when you also navigate with the parent window.

提交回复
热议问题