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
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

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Call a function within the ASP code 4 32
Html CheckBox obtain Its Value 5 43
Adjust an existing ASP Query 45 28
XML and version of MS XML Dom Document versions 5 44
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 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