Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ServerVariables("HTTP_USER_AGENT "), detect which?

Status
Not open for further replies.

Ovatvvon

Programmer
Joined
Feb 1, 2001
Messages
1,514
Location
US
Does anyone know what the proper code is to detect whether the user is useing MSIE or N.S.? obviously it would be Request.servervariables("HTTP_USER_AGENT "), but there is somthign where if it is NS then you can redirect it or if it is MSIE then you can redirect it.


Example:

If Request.ServerVariables("HTTP_USER_AGENT",1) = "MSIE" then
response.redirect("msie.asp")
Else
response.redirect("ns.asp")
End IF

Thanks in advance!
-Ovatvvon
 
Lol, I found it myself just a few minutes later.
Here it is if anyone else needs it:


Dim btype
if instr(request.servervariables("HTTP_USER_AGENT"),"MSIE") then
btype = "IE"
else
btype = "NS"
end if


-Ovatvvon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top