About window.history.back() backward problem

Under Windows window.history.back() the state of the previous page is returned instead of the previous page. If I modify a page three times, I have to go back three times to go back to the previous page. And the deleted data in the database is still displayed on it, which is very impractical.

Solution: history.back () and then add a reload () so that you can go back to the refreshed page

Namely: history.back (); location.reload (); if there is a frame, just add the name of the frame before it

****************************Notes******************************************

1: history.go (- 1);// return to the previous page. Return without data

2: window.**** ==*****;

3:window.**** ==document.***

4: Use document.location.href After switching, you can return to the original page. And use it document.location.replace After switching, you cannot go back to the original page by “back”.

 

<inputtype=buttonvalue=Refresh onclick="window.location.reload()">
<inputtype=buttonvalue=Forward onclick="window.history.go(1)">
<inputtype=buttonvalue=Backward onclick="window.history.go(-1)">
<inputtype=buttonvalue=Forward onclick="window.history.forward()">
<inputtype=buttonvalue=Backward onclick="window.history.back()">Backward+Fresh<inputtype=buttonvalue=Backward onclick="window.history.go(-1);window.location.reload()"&>In C# Web application, such as writing back to the previous page code for the page button

 

Similar Posts: