awalkinthepark
asked on
Identify Browser type and version in ASP
This reports IE 10 as IE 7
var bc = Server.CreateObject("MSWC. BrowserTyp e");
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
var bc = Server.CreateObject("MSWC.
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
I'm guessing ServerVariables doesn't work for you?
Have you already tried parsing the Request.ServerVariables("H TTP_USER_A GENT") variable?
ASKER
Right, when using windows 7 and IE 10
Request.ServerVariables("H TTP_USER_A GENT") 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)
Request.ServerVariables("H
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)
Is compatibility mode enabled in IE10?
ASKER
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.
to toggle compatibility mode.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
Nice.
"Trident/6.0" so obvious!
Thanks.
And for anyone else needing it:
var str= new String(Request.ServerVaria bles("HTTP _USER_AGEN T"));
var IE10Flag = str.indexOf("Trident/6.0") ;
Followed by :
if (IE10Flag>0) {
//do something
}
"Trident/6.0" so obvious!
Thanks.
And for anyone else needing it:
var str= new String(Request.ServerVaria
var IE10Flag = str.indexOf("Trident/6.0")
Followed by :
if (IE10Flag>0) {
//do something
}
ASKER
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
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
Everybody is telling me that today...