How can I get the previous page from a story in classic ASP?

Is there a way to get the previous page that the user was on in classic ASP? I am looking for an equivalent history.go(-1)in JavaScript.

+3
source share
2 answers

Depending on your needs, you can use:

Request.ServerVariables("HTTP_REFERER");

Returns a string containing the URL of the page referenced by the request on the current page using the tag <a>. If the page is redirected, it is HTTP_REFERERempty.

Usually, if I need to know where the user came from, I would set this explicitly in querystring or in a form variable.

+7
source

http://www.w3schools.com/asp/coll_servervariables.asp

Request.ServerVariables( "HTTP_REFERER" )

+1

Source: https://habr.com/ru/post/1734472/


All Articles