Facebook Twitter Reddit LinkedIn

Obtain a Header List With ASP's ServerVariables Collection

The SeverVariables collection contains all kinds of information about the calling client and the server. For instance, you can determine a visitor's browser type with the HTTP_USER_AGENT variable. Or, you can use HTTP_REFERER to determine the referring Internet address. Not all browsers support the same headers, however.

To see a quick list of the headers supported within a browser, run the following code.

<TH colspan="2">ServerVariables</TH>
<%
For Each var in Request.ServerVariables
With Response
.Write("<TR>")
.Write("<TD><B>" & var & "</B>:</TD>")
.Write("<TD>" & Request.ServerVariables(var) & "</TD>")
.Write("</TR>")
End With
Next
%>
</TABLE>

Source: Mike D. Jones
© 2007-2019 All rights reserved.   Part of the somuch.com group of trusted web sites.   PO Box 1542, Ormond Beach FL 32175