Browser Function
- Home
- ASP
- Functions
- Browser Function
The Browsr function returns the HTTP_USER_AGENT of the request.serverVariables
collection. Browsr returns the complete name of the currently used browser.
Syntax:
string = Browsr()
Example Usage:
<%
dim a
a = Browsr
if InStr( a, "MSIE" ) then
' browser is Internet Explorer
else
' browser is some other type...
end if
%>
ASP Source Code:
<%
Private Function Browsr()
Browsr = Request.ServerVariables("HTTP_USER_AGENT")
End Function
%>
The Result
You are not using Internet Explorer
User Agent provided is: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
asp functions library VBScript VBSCRIPT active server pages aps iis IIS pws PWS newbie