Request|server The following conditions are normally obtained from the address bar of the browser request.servervariables ("Http_referer"):
1. Direct use of <a href>
2. Forms submitted with Submit or <input type=image> (POST or get)
3. Forms submitted using JScript (POST or get)
Let's take a look at the case where Request.ServerVariables ("Http_referer") is not properly evaluated:
1. Links from Favorites
2. Click ' Home ' or a custom address
3. Use JScript's Location.href or Location.replace ()
4. Enter the address directly in the browser
5.<%response.redirect%>
6.<%response.addheader%> or <meta http-equiv=refresh> steering
7. Load addresses with XML
Obviously, Request.ServerVariables ("Http_referer") is not working properly in most cases, let's look at an example:
Ref.asp
<%
Response.Write "came from:" & Request.ServerVariables ("Http_referer")
%>
Ref.htm
<%
Response.AddHeader "Refresh", "10; Url=ref.asp "
%>
<meta http-equiv= ' Refresh ' content= ' 10; Url=ref.asp ' >
<form Method=get action=ref.asp name=getform>
<input type=submit value= ' go there (get) >> ' >
<input type=image style= ' Cursor:hand ' >
</form><p>
Look at the results of what the above code will get.
<form method=post action=ref.asp name=postform>
<input type=submit value= ' go there (POST) >> ' >
<input type=image style= ' Cursor:hand ' >
</form><p>
<a href= ' ref.asp ' > Direct link </a><p>
<a href= ' # ' >javascript post</a>