Solved

Code to check web Browser.

Posted on 2004-04-07
7
442 Views
Last Modified: 2008-03-10
Is there a code that can check which webbrowser the computer is useing
0
Comment
Question by:eteran
7 Comments
 
LVL 19

Expert Comment

by:BrianGEFF719
Comment Utility
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
Comment Utility
Sorry you should do:


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




-Brian
0
 

Author Comment

by:eteran
Comment Utility
okay now my question to you is how do I make it check the version
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 19

Expert Comment

by:BrianGEFF719
Comment Utility
HTTP_USER_AGENT should contain the Version number as well.



-Brian
0
 
LVL 20

Expert Comment

by:jitganguly
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
An ASP query I cannot work out... 2 44
API not working 33 47
API works for 1 result, need to make it many 30 48
ASP Focus problem 3 25
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 information …
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

728 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now