19

Well, I've been working on an User-Agent based shared-session protection between subdomains.

I was extremely surprised that it's been working well until IE 11 preview was released recently. There are 2 subdomains

example.com and sub.example.com

I've intercepted requests to both domains and it seems that USER-AGENT HTTP Header being sent to each domain is different.

Request to example.com has:

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko

Request to sub.example.com has:

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.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; BRI/1; MS-RTC LM 8; rv:11.0) like Gecko

Do you have any idea what is the reason for this strange dynamic behavior?

2 Answers 2

19

Microsoft has the site in question configured to use UA-spoofing (via the Compatibility View list) and that causes IE to send a custom UA string.

CompatView-based UA spoofing was enabled in IE8 in 2008: http://blogs.msdn.com/b/ie/archive/2008/08/27/introducing-compatibility-view.aspx

And in IE10+, it's gotten richer, with per-site spoofing to enable the best experience. See http://blogs.msdn.com/b/ieinternals/archive/2013/09/21/internet-explorer-11-user-agent-string-ua-string-sniffing-compatibility-with-gecko-webkit.aspx for an exploration of this topic.

3
  • Hi Eric and thanks for the answer. I'm not entirely convinced but this indeed might be the reason. I'll check if I can disable that
    – WooDzu
    Aug 1, 2013 at 23:11
  • 2
    @EricLaw: That was my first reaction too, but note that it's sending the same version number to both servers. Both those UAs are rv:11.0; neither is "the legacy IE7 User-Agent string". Aug 2, 2013 at 6:01
  • In IE11, the Compatibility View List feature was made richer, and allows per-site compat hacks. For instance, if you look at the UA string when loading go.microsoft.com, the UA string is "Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; rv:11.0) like Gecko/20100101 Firefox/12.0"
    – EricLaw
    Aug 2, 2013 at 17:48
10

Official Microsoft Documentation on MSDN:

Quotes:

For many legacy websites, some of the most visible updates for IE11 involve the user-agent string. Here's what's reported for IE11 on Windows 8.1:

Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko

Here's the string for IE11 on Windows 7:

Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko

In rare cases, it may be necessary to uniquely identify IE11. Use the Trident token to do so.

Isn't it nice, they say "like Gecko"? ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.