I have found several return methods on the Internet and posted them. You can use them directly!
JS-return button returns the previous history page
Link return:
<A href = "#" onclick = "javascript: history. Go (-1)"> return </a>
Button return:
<Input type = "button" name = "back" value = "return" onclick = "javascript: history. Go (-1)">
Onclick returns:
Onclick = "javascript: history. Back (); Return false ;"
Firefox must add return false;
Onclick = "javascript: history. Go (-1); Return false ;"
Certificate ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Asp return button returns the previous history page
ASP returns:
Response. cache. setcacheability (httpcacheability. nocache );
Response. expires =-1;
Response. addheader ("Pragma", "No-Cache ");
Response. addheader ("cache-control", "No-Cache ");
Response. cachecontrol = "no-Cache ";
Response. cache. setnostore ();
Disable caching
Among the many solutions I have found, it is recommended to disable page caching. Specifically, the server script is used as follows:
Response. Buffer = true;
Response. expiresabsolute = now ()-1;
Response. expires = 0;
Response. cachecontrol = "no-Cache ";
This method is very effective! It forces the browser to re-access the server download page instead of reading the page from the cache. When using this method, the programmer's main task is to create a session-level variable, using this variable to determine whether the user can still view the page that is not suitable for access through the back button. Because the browser no longer caches this page, when the user clicks the back button, the browser will re-download the page, then the program can check the session variable to see whether the user should be allowed to open this page.
For example, suppose we have the following form:
<%
Response. Buffer = true
Response. expiresabsolute = now ()-1
Response. expires = 0
Response. cachecontrol = "no-Cache"
If Len (Session ("firsttimetopage")> 0 then
"The user has accessed the current page and now returns access again.
"Clear session variables and redirect users to the logon page.
Session ("firsttimetopage") = ""
Response. Redirect "/bar. asp"
Response. End
End if
"If the program runs here, you can view the current page.
"Create a form as follows
%>
<Form method = post action = "somepage. asp">
<Input type = submit>
Ii. <HTML>
<Head>
<Meta http-equiv = "expires" content = "0">
<Meta http-equiv = "cache-control" content = "no-Cache">
<Meta http-equiv = "Pragma" content = "no-Cache">
</Head>
III:
<Script language = "JavaScript">
<! --
Javascript: window. History. forward (1 );
// -->
</SCRIPT>
IV:
<A href = "pagename.htm" onclick = "javascript: location. Replace (this. href); event. returnvalue = false;">