Correct detection of IE in compatibility mode

4,964 views
Skip to first unread message
Assigned to james.e...@gmail.com by me

Alberto Fernandez

unread,
Aug 25, 2013, 1:44:50 PM8/25/13
to brow...@googlegroups.com
From this page:

http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx

When Internet Explorer is in Compatibility Mode (IE >= 8), then it sends a user angent:

... MSIE ${versionEmulated}; Trident/${realVersion} ...

So, by example, in my IE8:

Normal mode
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C)


compatibility mode:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C)

browscap is detecting IE8 in compatibility mode as IE7, which I think as incorrect.

Some expresions with Trident are misplaced (placed on the section of version indicated by MSIE instead of the section that matches Trident).

Solution: move and change expresions with Trident to the real matching IE.


Trident/4.0 -> Internet Explorer 8
Trident/5.0 -> Internet Explorer 9
Trident/6.0 -> Internet Explorer 10
Trident/7.0 -> Internet Explorer 11

James Titcumb

unread,
Aug 25, 2013, 2:16:28 PM8/25/13
to browscap

Hi Alberto

There is already a thread regarding IE compatibility mode. Please see the following thread for my response on this:

https://groups.google.com/forum/m/#!topic/browscap/N9ceq6h7Uo8

Thanks
James

--
You received this message because you are subscribed to the Google Groups "browscap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to browscap+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Alberto Fernandez

unread,
Aug 25, 2013, 2:56:20 PM8/25/13
to brow...@googlegroups.com
Hi James.
I think it's a different issue. Maybe a first step to get the other done.
In the other issue Robin is talking about set a new boolean property indicating a browser in compatibility mode (maybe the version emulated instead? ...)
I want to change the browser detected from version 7 to 8 (in my example).
In the sample, the same browser is detected as 7 or 8 depending on their mode. I want it detected always as 8.

Maybe you prefer joining it to the other issue.

Thanks
Alberto


Alberto Fernandez

unread,
Aug 25, 2013, 5:57:09 PM8/25/13
to brow...@googlegroups.com
Hi

really is duplicate of

https://groups.google.com/forum/#!topic/browscap/FFf70xDM4XU
https://groups.google.com/forum/#!topic/browscap/-4P1wNXdrUA

I propose to detect IE8+ versions by their Trident token at first, because it gives the real version

Mikolaj Misiurewicz

unread,
Aug 25, 2013, 6:08:29 PM8/25/13
to brow...@googlegroups.com
It's a matter of opinion - should one return the real version or the version that the User Agent string intends to emulate?

I don't think its necessary to start a discussion which system is better.

That's because, in my opinion, there is one thing that is worse than using any of those systems.

And that's CHANGING IT in a popular class that has a long history.

People who actually use the ->version data in their code won't suddenly revise all their code because you've decided to change your mind about identification of IE in compatibility mode. That's because the vast majority of them won't know about the change.

This means that, if such change would be introduced, it would break a lot of existing code.

Adding an additional field so you can identify the real version of the browser does not create this problem.


So, in my opinion, whatever identification is done now should be absolutely kept without change.

Станислав Алпатов

unread,
Mar 15, 2014, 6:33:59 AM3/15/14
to brow...@googlegroups.com
I am sure that this decision is a mistake. I used browscap only for identification compatibility mode browsers to block unwanted versions. Requires a separate data field to determine the real browser version.

James Titcumb

unread,
Mar 15, 2014, 8:11:01 AM3/15/14
to browscap

Hi there,

Browscap is intended to identify the browser capabilities, and therefore if IE is in compatibility mode, we should accept the intended UA as the browser is intending to emulate the capabilities of the older browser.

IE compatibility mode should be identified by the browser it is trying to masquerade as, not the actual browser.

James

On 15 Mar 2014 10:33, "Станислав Алпатов via browscap" <browscap+noreply-APn2wQcyet5JvJ9...@googlegroups.com> wrote:
I am sure that this decision is a mistake. I used browscap only for identification compatibility mode browsers to block unwanted versions. Requires a separate data field to determine the real browser version.

--
You received this message because you are subscribed to the Google Groups "browscap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to browscap+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages