Forum Moderators: open
at the moment i am using a javascript to detect whether my visitors browser is below version 5 of netscape if it is then i display something else. the javascript i am using is:
<SCRIPT LANGUAGE="JavaScript">
Netscape = navigator.appName == "Netscape";
if(Netscape) {
NetscapeVer = parseFloat(navigator.appVersion);
if(NetscapeVer < 5) document.write('Netscape4');
}
</SCRIPT>
i've been told that this can be done in asp by detecting the user agent and the version, can anyone tell me how i can do this?
thanx in advance
<%
If InStr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") Then
Response.Write("Your browser is Internet Explorer!")
Else If InStr(Request.ServerVariables("HTTP_USER_AGENT"),"Mozilla") Then
Response.Write("Your browser is Netscape!")
Else
Response.Write("Your browser is other than Internet Explorer and Netscape.")
End If
End If
%>
/WebDevJim