Use Window.history.go (-1) to return to the previous page at the same time to refresh the "up", this is suitable for "on the page" contains dynamic update content, such as calling the Forum's new posts, call the article system's latest article and so on. If your "Up page" does not have dynamically updated content, it is recommended not to do this, others point back to the time to load again. force load and refresh once
Add the following code to the page you want to load: View source print?
1 |
<script type= "Text/javascript" > |
2 |
if (window.name!= "Bencalie") { |
4 |
Window.name = "Bencalie"; |
disable caching to achieve a refresh effect
Reference content: View source print?
1 |
<metahttp-equiv= "Expires" content= "0" > |
2 |
<metahttp-equiv= "Cache-control" content= "No-cache" > |
3 |
<metahttp-equiv= "Pragma" content= "No-cache" > |
Back to the previous page code: View Source print?
1 |
<a href= "Javascript:window.history.go ( -1)" > Return to Previous page </a> |
PHP will often use the following method, the server is processed to return to the previous page: View source print?
2 |
echo "<script>alert" (' Upload succeeded. '); Window.location = \ "". $page. " \ ";</script>" |
;