Can I detect when a user gets to a page using the back button?

前端 未结 4 839
無奈伤痛
無奈伤痛 2021-01-11 20:37

Edit: What I really need to know is if there is any javascript event that will reliably fire when the user arrives at the page via the back button. I trie

4条回答
  •  我在风中等你
    2021-01-11 20:58

    I don't think you can test for the back button specifically, but I believe you can check the browser's history position with Javascript.

提交回复
热议问题