Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 494
  • Last Modified:

Code to check web Browser.

Is there a code that can check which webbrowser the computer is useing
0
eteran
Asked:
eteran
1 Solution
 
BrianGEFF719Commented:
you can do:

Request.ServerVariables("HTTP_USER_AGENT")



so therefore:

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





Good Luck
-Brian
0
 
BrianGEFF719Commented:
Sorry you should do:


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




-Brian
0
 
eteranAuthor Commented:
okay now my question to you is how do I make it check the version
0
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!

 
BrianGEFF719Commented:
HTTP_USER_AGENT should contain the Version number as well.



-Brian
0
 
jitgangulyCommented:
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
 
kingsfan76Commented:
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
 
TheKenmanCommented:
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now