Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Identify Browser type and version in ASP

Posted on 2013-05-28
10
Medium Priority
?
1,078 Views
Last Modified: 2013-05-28
This reports IE 10 as IE 7
var bc = Server.CreateObject("MSWC.BrowserType");

Anyone have a way to detect IE 10 using ASP?

I'd rather not jump through the hoops to  try  cyScape.BrowserObj.  
Also unknown if that's going to work on Win 2008 server .

Thanks
0
Comment
Question by:awalkinthepark
[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
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 39202566
I'm guessing ServerVariables doesn't work for you?
0
 
LVL 4

Expert Comment

by:baller119
ID: 39202584
Have you already tried parsing the Request.ServerVariables("HTTP_USER_AGENT") variable?
0
 

Author Comment

by:awalkinthepark
ID: 39202601
Right, when using  windows 7 and  IE 10
Request.ServerVariables("HTTP_USER_AGENT")  returns:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 4

Expert Comment

by:baller119
ID: 39202609
Is compatibility mode enabled in IE10?
0
 

Author Comment

by:awalkinthepark
ID: 39202613
That's the point. I want to detect if it's IE 10 , and if so, put a message up to the users
to toggle compatibility mode.
0
 
LVL 4

Accepted Solution

by:
baller119 earned 2000 total points
ID: 39202614
The portion of the string that indicates IE10 in your example is "Trident/6.0" - that is unique to IE10.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39202706
Here's a list of IE User Agent strings: http://www.useragentstring.com/pages/Internet%20Explorer/  I'm sure it's not complete but it's something to work with.
0
 

Author Closing Comment

by:awalkinthepark
ID: 39202836
Nice.
"Trident/6.0"  so  obvious!

Thanks.
And for anyone else needing it:

var str= new String(Request.ServerVariables("HTTP_USER_AGENT"));
var IE10Flag = str.indexOf("Trident/6.0");

Followed by :

if (IE10Flag>0) {
//do something
}
0
 

Author Comment

by:awalkinthepark
ID: 39202847
according to that link,
there are  IE 10  strings without Trident 6.0
but they have "MSIE 10.0"  so I guess check for either

Sorry closed  it before seeing that so can't give you points
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39202854
Everybody is telling me that today...
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

670 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