How do I remove a page from the browser history?

前端 未结 8 1653
孤独总比滥情好
孤独总比滥情好 2021-02-07 11:21

I have an have an ASP.Net page which contains a button. This Page contains a ServerSide Paypal button.

When pushed my server does various clever things on the back end a

8条回答
  •  野的像风
    2021-02-07 11:49

    window.location.replace(URL);
    

    window.location:

    replace(url)

    Replace the current document with the one at the provided URL. The difference from the assign() method is that after using replace() the current page will not be saved in session history, meaning the user won't be able to use the Back button to navigate to it.

提交回复
热议问题