Why does Firefox 5 ignore document.ready?

前端 未结 2 1467
借酒劲吻你
借酒劲吻你 2021-01-06 06:22

Why does Firefox 5.0.1 not refresh this page when the back button is pressed?



  

        
2条回答
  •  情歌与酒
    2021-01-06 06:36

    See Ajax, back button and DOM updates and Restore object classes on back button in Firefox about Firefox's page cache that stores the entire state of the page and does not fire load events in most cases. If you want to avoid having Firefox save your page state (which depends upon what kind of state you have in the page), it looks like you can get it to skip it by registering an unload event for the page. Because an unload event could invalidate the page state, Firefox doesn't cache the page state if you have one and the back button will load the page freshly on the back button and all normal load events will fire.

提交回复
热议问题