how to force page refresh on browser back click?

前端 未结 2 1413
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-10 14:45

Is there a cross-browser compatible way of forcing page refresh when clicking the navigator back button?

i am trying to access to actualised cookies :

i have

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-10 15:24

    I had a similar requirement in my project. You can do something like this:

    For example, lets say there are two pages: page1 and page2

    In Page1 do something like this:

    
    

    And in page2:

    
    

    Now, it will force a page refresh on page1, whenever you click back button from page2.

提交回复
热议问题