Link to home
Start Free TrialLog in
Avatar of siva_gk
siva_gk

asked on

get browser type using ASP

I have the following code in my page to find out the browser type. I am using Internet Explorer 7. But how comes the result returning the Browser is Netscape...?

the result which I got is

output:
Browser: Netscape
Version: 4.00
Majorver: 4
Minorver: 00
Platform: unknown
Supports frames: True
Supports tables: True
Supports cookies: True
Supports JavaScript: True

thanks
<%
' create an instance of the Browser Capabilities component
Set browserdetect = Server.CreateObject("MSWC.BrowserType")
 
browser=browserdetect.Browser
version=browserdetect.Version
majorver=browserdetect.Majorver
minorver=browserdetect.Minorver
platform=browserdetect.Platform
frames=browserdetect.Frames
tables=browserdetect.Tables
cookies=browserdetect.Cookies
javascript=browserdetect.JavaScript
 
 
' send some output to the web browser
response.write ("Browser: " & browser & "<BR>")
response.write ("Version: " & version & "<BR>")
response.write ("Majorver: " & majorver & "<BR>")
response.write ("Minorver: " & minorver & "<BR>")
response.write ("Platform: " & platform & "<BR>")
response.write ("Supports frames: " & frames & "<BR>")
response.write ("Supports tables: " & tables & "<BR>")
response.write ("Supports cookies: " & cookies & "<BR>")
response.write ("Supports JavaScript: " & javascript & "<BR>")
%>

Open in new window

Avatar of rdivilbiss
rdivilbiss
Flag of United States of America image

>how comes the result returning the Browser is Netscape...?

Probably because you are using no or an old Browsercap.ini file which does not have the correct information.

http://support.microsoft.com/kb/311227
ASKER CERTIFIED SOLUTION
Avatar of siva_gk
siva_gk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial