Her er et script som kan lidt mere:
<%@ LANGUAGE=VBSCRIPT %>
<% strUA = Request.ServerVariables(\"HTTP_USER_AGENT\") %>
...
<TABLE>
<TR>
<TD ALIGN=\"RIGHT\">navigator.userAgent:</TD>
<TD><B><% = strUA %></B>
</TD>
</TR>
</TABLE>
<P>
<%
QUOT = Chr(34)
If InStr(strUA, \"MSIE\") Then \'it\'s a Microsoft Browser
Response.Write \"To upgrade your browser go to \" _
& \"<A HREF=\" & QUOT & \"
http://www.microsoft.com/ie/\" _
& QUOT & \">
http://www.microsoft.com/ie/</A></P>\" intVersion = CInt(Mid(strUA, InStr(strUA, \"MSIE\") + 5, 1))
If intVersion > 3 Then
Response.Write \"You can use Microsoft Dynamic HTML\"
End If
Else
If InStr(strUA, \"Mozilla\") Then \'it\'s a Netscape-compatible browser
If InStr(strUA, \"compatible;\") = 0 _
And InStr(strUA, \"Opera\") = 0 Then \'it\'s probably a Netscape browser
Response.Write \"Your browser is probably Navigator. You can \" _
& \"download the latest verion of Navigator from \" _
& \"<A HREF=\" & QUOT & \"
http://home.netscape.com/download/\" _
& QUOT & \">
http://home.netscape.com/download/</A></P>\" intVersion = CInt(Mid(strUA, InStr(strUA, \"/\") + 1, 1))
If intVersion > 3 Then
Response.Write \"You can probably use Netscape Dynamic HTML\"
End If
Else \'not Netscape, so we\'ll allow the user to search on the Web for it
If InStr(strUA, \"Opera\") Then
\'Opera 3.60 doesn\'t include \'compatible\' in UA string
strProduct = Trim(Mid(strUA, InStr(strUA, \")\") + 1))
Else
\'use the part after the \'compatible;\' keyword
strProduct = Mid(strUA, Instr(strUA, \"compatible;\") + 11)
strProduct = Trim(Left(strProduct, Instr(strProduct, \";\") - 1))
End If
strSearchURL = \"
http://www.altavista.digital.com/cgi-bin/query?q=\" _
& Server.URLEncode(strProduct & \" web browser\")
Response.Write \"Your browser is Navigator-compatible. You can \" _
& \"search for the manufacturer using a search engine, such as \" _
& \"<A HREF=\" & QUOT & strSearchURL & QUOT & \">\" & strSearchURL _
& \"</A></P>\"
End If
End If
End If
%>