browser detection

Greetings, all.  
I wonder if anyone can help me with a cleaner type of browser detection than
the one I am using (see below).  The problem with this script is that it
relies on a little file called "browscap.ini" installed by Microsoft
Internet Information Server.  This file functions as a look-up table of
various versions of various browsers.  But as near as I can tell, recent IIS
installations include a browscap.ini file that does not have a definition
for Internet Explorer 5 or 5.5. (??!!)   So every time I set up a new
server, I have to manually install the right file.  

There must be a better way to do this.  Any suggestions?

-Rex Palmer


var bType = Server.CreateObject ("MSWC.BrowserType"); 
var bName = "" + bType.browser; 
var bMajorVersion = "" + bType.majorver; 
var br; if(bName == "IE" && bMajorVersion >= 5) br = "e5"; 
else if (bName == "Netscape"){ if((bMajorVersion == "") || (bMajorVersion ==
"undefined")){ br = "n4"; } 
else if(bMajorVersion >= 4){ br = "n4"; } } 
else if (bName == "IE" && bMajorVersion >= 4) br = "e4"; 

Received on Thursday, 10 August 2000 17:44:21 UTC