My IE5.01 thinks he (or she) is Netscape 4.00

I updated my browser from IE 4.0 to IE 5.01. With IE4 the script below worked just fine, all the information was correct and so on. After the update the script acclaims that my browser is Netscape 4.00 and it doesn't support VBScript (objBC.VBScript returns False). The funny part is that the script is VBScript...

My OS is Win98. Any ideas anyone?

Here is the script....

<%
Dim objBC
Dim objConn

Set objBC=Server.CreateObject("MSWC.BrowserType")

Response.Write ScriptEngine & "<B> Version </B>" & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion & " Build " & ScriptEngineBuildVersion & "<BR><BR>"

Response.Write "Browser " & objBC.Browser & " " & objBC.Version & "<BR>"

Response.Write "Java " & objBC.JavaScript & "<BR>"
Response.Write "VBS " & objBC.VBScript & "<BR>"
Response.Write "Java " & JavaScript & "<BR>"
Response.Write "VBS " & VBScript & "<BR>"
%>

... and it returns:

VBScript Version 5.1 Build 4615

Browser Netscape 4.00
Java True
VBS False
JEPAsked:
Who is Participating?
 
Ginger_EdConnect With a Mentor Commented:
jep,  

you need to get an updated browscap.ini file and put it on your system.   The file is large (larger than notepad can read) so if you give me you email address I will send it to you.

Just do a search of your system and put it in the same place as the one you already have.

Ed
0
 
davlun20080Commented:
Just a thought but you might want to post this question in the ASP section of EE.  You might get better answers...
0
 
FaxeCommented:
the problem with using browscap.ini or any other type of solution which relies on static information is that it gets outdated.
If you get a new browscap.ini, for example, you'll need to update it within a few months.
The best way of "client-mining" is parsing its header.
The script below is client-based js, but it's quick to modify into vbscript.

function browser(){
      var sUA=navigator.userAgent.toLowerCase();  
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);

    this.ns  = ((sUA.indexOf('mozilla')!=-1) && (sUA.indexOf('compatible')==-1));
      this.ns2 = (this.ns && (this.major == 2));
    this.ns3 = (this.ns && (this.major == 3));
    this.ns4 = (this.ns && (this.major == 4));
    this.ns4up = (this.ns && (this.major >= 4));
    this.nsOnly  = (this.ns && ((sUA.indexOf(";nav") != -1) || (sUA.indexOf("; nav") != -1)) );
    this.ns5 = (this.ns && (this.major == 5));
    this.ns5up = (this.ns && (this.major >= 5));

    this.ie   = (sUA.indexOf("msie") != -1);
      this.ie3  = (this.ie && (this.major < 4));
    this.ie4  = (this.ie && (this.major == 4) && (sUA.indexOf("msie 5.0")==-1) );
    this.ie4up  = (this.ie  && (this.major >= 4));
    this.ie5  = (this.ie && (this.major == 4) && (sUA.indexOf("msie 5.0")!=-1) );
    this.ie5up  = (this.ie  && !this.ie3 && !this.ie4);
      
      this.win   = ((sUA.indexOf("win")!=-1) || (sUA.indexOf("16bit")!=-1));
      this.mac    = (sUA.indexOf("mac")!=-1);
}

myClient = new browser()
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Ginger_EdCommented:
Faxe,  you can't use that in an ASP script only client side so lose the power of asp.

But your right the file does need updating, generally I update it for major releases like IE 5.5

Ed
0
 
FaxeCommented:
The only item which you cant convert to VBscript is actually navigator.appVersion

And appversion is only the 4.72 in the User Agent string. userAgent is right there in VBscript for you to read and consecutively parse.
0
 
Ginger_EdCommented:
How do you use navigator.userAgent in asp as a server side script, instead of a client script?

Ed
0
 
JEPAuthor Commented:
Thanks Ginger_Ed. I found a site where I downloaded the file. I put it on my machine and now everything is in perfect condition. Though I have found machines which don't have this file at all. Is this possibe? (no points for answering this one... ;])
0
 
Ginger_EdCommented:
the site I got the browscap.ini file, had something for sale which did the same sort of thing so it might be somethign like that.

Ed
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.