Code to check web Browser.

Posted on 2004-04-07
Last Modified: 2008-03-10
Is there a code that can check which webbrowser the computer is useing
Question by:eteran
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 19

Expert Comment

ID: 10779754
you can do:


so therefore:

document.write "You are using: " & Request.ServerVariables("HTTP_USER_AGENT")

Good Luck
LVL 19

Accepted Solution

BrianGEFF719 earned 500 total points
ID: 10779768
Sorry you should do:

response.write "You are using: " & Request.ServerVariables("HTTP_USER_AGENT")


Author Comment

ID: 10779797
okay now my question to you is how do I make it check the version
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

LVL 19

Expert Comment

ID: 10779805
HTTP_USER_AGENT should contain the Version number as well.

LVL 20

Expert Comment

ID: 10779862
Here is the code

    myUA = Request.ServerVariables("http_user_agent")
    ua = lcase(myUA)
    ie4 = instr(ua,"msie 4")
    ie5 = instr(ua,"msie 5")
    ie6 = instr(ua,"msie 6")

    if ie4>0 or ie5>0 or ie6> 0 then  ' It is IE 4 or IE 5 or IE 6
    'IE Code  


<%end if%>
LVL 12

Expert Comment

ID: 10780093

  'Create an instance of the Browser Capabilities Component
  Dim objBC
  Set objBC = Server.CreateObject("MSWC.BrowserType")
<b>Your browser:</b> <%=objBC.Browser%><br>
<b>Browser version:</b> <%=objBC.Version%><br>
<b>Support Frames?</B> <%=objBC.Frames%><br>

to use this object, make sure you have your Browscap.ini updated, otherwise it can't detectIE6.0;en-us;311227

that is the link to add IE 6 support the Browscap.ini file

Expert Comment

ID: 10780557
Here's one of the best javascript examples to get detailed version info (or if you need to check the version client-side):

Also to be used with:

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question