What is the best way to have a button mimic the "Back" browser button?
Asked
Active
Viewed 2,179 times
2 Answers
3
<a href="<%=Request.ServerVariables("HTTP_REFERER")%>">Back</a>

David Starkey
- 1,840
- 3
- 32
- 48
-
This has to be the best answer for a question which specifies Classic ASP :) – John Mar 26 '13 at 22:41
-
I like it better since it can be done server-side only. JS means you have to hit the client browser before going back. There are also a few issues with using JS to go back. – David Starkey Mar 26 '13 at 22:44
-
For the ones who are new to ASP: in this case REFERER is spelled incorrectly (should be referrer) but this is how it was defined. See https://stackoverflow.com/questions/3087626/was-the-misspelling-of-the-http-field-name-referer-intentional – Michiel van der Blonk Jun 21 '18 at 13:27