Solved

Code to check web Browser.

Posted on 2004-04-07
7
478 Views
Last Modified: 2008-03-10
Is there a code that can check which webbrowser the computer is useing
0
Comment
Question by:eteran
[X]
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
7 Comments
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 10779754
you can do:

Request.ServerVariables("HTTP_USER_AGENT")



so therefore:

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





Good Luck
-Brian
0
 
LVL 19

Accepted Solution

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


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




-Brian
0
 

Author Comment

by:eteran
ID: 10779797
okay now my question to you is how do I make it check the version
0
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

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



-Brian
0
 
LVL 20

Expert Comment

by:jitganguly
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  
%>

<%else
'NETSCAPE CODE
%>

<%end if%>
0
 
LVL 12

Expert Comment

by:kingsfan76
ID: 10780093
http://www.4guysfromrolla.com/webtech/121400-1.2.shtml

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

http://support.microsoft.com/default.aspx?scid=kb;en-us;311227

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

Expert Comment

by:TheKenman
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):

http://www.dynamicdrive.com/dynamicindex9/browsersniffer.htm

Also http://webreference.com/tools/browser/javascript.html to be used with: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
0

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