The IE10 User-Agent String


We recently announced
IE10 Platform Preview 1
. Aside from
some
exciting
new
features,
this platform preview also includes the new IE10
user-agent string
:

    Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)

Overall this represents a natural evolution of
the IE9 user-agent string
with only two changes:

  • The value of the “MSIE” token is now “10.0”
  • The value of the “Trident” token is now “6.0”

Also, Compatibility View still maps to IE7 Standards Mode just like in IE8 and IE9.
Here the user-agent string mimics IE7 for compatibility, but the “Trident” token
is now “6.0” to signify IE10 is in use.

    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0)

Does this affect me?

Ideally, very few people should care about these changes. In particular, those of
you
using

feature

detection
exclusively can sit back and relax.

However if your site is still using
user-agent sniffing
, then increasing the “MSIE” token to “10.0” is particularly
noteworthy. Why? Because it adds an extra digit to the string value of the token.
Most sites will handle this effortlessly, but some will process the extra digit
incorrectly, causing them to identify IE10 as IE1.

To help illustrate, here’s a regular expression that only captures the first digit
of the “MSIE” token’s value:

    // INCORRECT: will report IE10 version in capture 1 as "1"
    var matchIE = /MSIE\s(\d)/;

And here’s one that captures the full value of the “MSIE” token:

    // Correct: will report IE10 version in capture 1 as "10.0"
    var matchIE = /MSIE\s([\d.]+)/

Of course your code may look significantly different depending on your choice of
programming language, approach to string parsing, etc. Those of you with custom
HTTPS configurations on Apache may also want to read
this blog post by Eric Lawrence
.

Call to action

Download IE10
Platform Preview 1
to test how your site responds to IE10’s user-agent string.
Update your user-agent sniffing logic if necessary, or even better, consider migrating
to feature detection to make worrying about changes like this a thing of the past.

—Tony Ross, Program Manager, Internet Explorer

Comments (50)

  1. Anonymous says:

    Nice to see it being done properly! I checked my regex code and it's coded fine and wont have any trouble with IE10. Though I only have to worry about IE less than or equal to 8 🙂

    IE9 copes with any modern code I throw at it and gets it right. This makes me happy!

  2. Anonymous says:

    I would have preferred "Trident/6.0 (compatible; MSIE 10.0; Windows NT 6.1)". Shorter and more realistic.

  3. Anonymous says:

    FremyCompany: I agree. It's time to get rid of this "Mozzila" thing 🙂

  4. Anonymous says:

    Isn't it time to finally drop "Mozilla"?

    What about MSIE/10.0 (Windows NT 6.1; Trident/6.0)

  5. Anonymous says:

    Just remember that a dot in regular expression captures any character. So, you should use:

    var matchIE = /MSIEs([d.]+)/

    Instead of the regex of the text. Just add a backslash before the dot.

  6. Anonymous says:

    Marcos, dot in square brackets is just a dot.

  7. Anonymous says:

    @BS-Harou why would you get rid of Mozilla? if anything I would add WebKit so that if this gets ported to Windows Phone 7 one day – all the mobile sites across the planet will actually recognize the Windows Phone 7 browser as a "capable" browser.

    right now, if you go mobile, only Gecko,Opera and WebKit matter… Trident doesn't even exist in mobile development these days. and we know that MSFT will never have a tablet as they waited too long.

    besides, the Mozilla/5.0 is still needed so that you can detect which number is related to the core "level" of the browser in terms of capability.

  8. Anonymous says:

    Can you please provide VPC images for IE9 and IE10?

  9. NumbStill says:

    Can you, please, take a look at this issue?

    connect.microsoft.com/…/interoperability-issue-invisible-borders

    No one from Microsoft has responded to it and it simply makes Israeli/RTL websites use compatibility tags, or stupid hacks to make the page look right.

    The borders do not show up right, or event at all sometimes.

  10. Anonymous says:

    @Tony Ross [MSFT]

    1-

    What does "Mozilla/5.0" do or mean or achieve in terms of relevance and usefulness? a) for web authors? b) for website admins?

    What purpose does "Mozilla/5.0" serve in an IE user agent string?

    Is there a meaning, a goal served by "Mozilla/5.0" in an IE10 user agent string?

    Is there a meaning, a goal served by "Mozilla/5.0" in an IE user agent string in 2011+?

    2-

    What does "compatible;" do or mean or achieve in terms of relevance and usefulness? a) for web authors? b) for website admins?

    What purpose does "compatible;" serve in an IE user agent string?

    Is there a meaning, a goal served by "compatible;" in an IE10 user agent string?

    Is there a meaning, a goal served by "compatible;" in an IE user agent string in 2011+?

    I fully agree with and support FremyCompany, LorenzoDV and others who are inviting you to clean up/shrink this user agent string to bare minimum, to reliable, useful and relevant info.

    regards, Gérard Talbot

  11. Anonymous says:

    Agree with many other comments so far, clean it up and get rid of the irrelavent old bits, since the number 10 is going to cause some problems with bad UA detection anyway, you might as well deal with mozilla and compatable at the same time.

  12. Anonymous says:

    @Gérard Talbot: By adding Mozilla to their user agent they pay tribute to the great achievements by Mozilla/Netscape. 😉

  13. Anonymous says:

    yeah time to drop the Mozilla/5.0  (sending that header out is pointless and waste of bandwith)not to mention kinda old

  14. Anonymous says:

    Hello,

    ASP.NET is using user-agent sniffing per default (bad). As it could be feared, in ASP.NET 4 (latest version fully updated), the IE10 user-agent string causes problem (i.e. parts of some ASP.NET Web sites are not working), as the browser is not known and therefore not recognised as having JavaScript or cookies (among other things).

    As a consequence, a central function such as __doPostBack() is not defined for IE10. This can easily be tested by making a blank new Web site (in Visual Studio), add e.g. a LinkButton, and compare source code sent to IE9 (functional) and to IE10 (not functional). This is crazy that two recent core products from Microsoft do not work together.

    – How to disable completely browser sniffing in ASP.NET 4?

    – What is otherwise the recommended procedure?

    – In the meantime to make it work and to avoid similar issues in the future, I use a file ~App_BrowsersBrowserFile.browser with the following:

    <browsers>

    <browser refID="Default">

    <capabilities><!– To avoid wrong detections of e.g. IE10 –>

    <capability name="cookies" value="true" />

    <capability name="ecmascriptversion" value="3.0" />

    </capabilities>

    </browser>

    </browsers>

    For the curious, ASP.NET is using some bad procedures, detecting IE with the following code in

    "C:WindowsMicrosoft.NETFrameworkv4.0.30319ConfigBrowsersie.browser"

    <userAgent match="MSIE (?'version'(?'major'd+)(.(?'minor'd+)?)(?'letters'w*))(?'extra'[^)]*)" />

    and then limited to versions 6 to 9…

    <capability name="majorversion" match="[6-9]" />

    Cordially,

    Alexandre

    http://alexandre.alapetite.fr

  15. Anonymous says:

    How about removing Mozilla for standards mode, and leaving it in for compatibility mode ?

  16. Anonymous says:

    Remove Mozilla in Standards mode if it will make the browser load faster… if removing mozilla will slow down IE then keep it…     Mozilla sounds like something the devs of Mozilla Firefox would use 😛

  17. Anonymous says:

    Please release IE10 for Windows Vista. The point isn't whether Vista is a good product or bad. It's a current supported product and longetivity/backward compatibility was one of the flagship features of the Windows platform. Vista is a release just before the current release. Because Windows 8 is far from release, IE10 SHOULD HAVE BEEN MADE FOR WINDOWS VISTA. There should be a class action lawsuit against this shameless greedy corporation for giving such heinous treatment to a product just earlier than the latest. Even Apple supports the latest OS and the one before it.

  18. Anonymous says:

    Nice to see the MS addressing an issue early, but far more importantly, putting the onus on those who have been doing it wrong in the first place, to fix their code. I can think of many other decisions where this wasn't done.

  19. Anonymous says:

    I have submitted a bug about the issue with IE10's user-agent string in ASP.NET, and the general problem with ASP.NET user-agent sniffing:

    connect.microsoft.com/…/asp-net-user-agent-sniffing-and-ie10-internet-explorer-10

    Cordially,

    Alexandre

    http://alexandre.alapetite.fr

  20. Anonymous says:

    Should we start a protest together with a lot of people and start surfing the preview with a user agent string like this:

    MSIE 10.0 (Trident/6.0; Windows NT 6.1)

  21. Anonymous says:

    The second regex (/MSIEs([d.]+)/) is incorrect. A '.' matches any char. What you meant was: /MSIEs([d.]+)/

    The IE team has gotten really gansta. This page has an obvious styling bug in chrome and also every MS download center page does not work in chrome at all (button unclickable). The incompatibility incidences on MS properties become more and more. I also often notice that text in other browsers than IE is blurry on this blog. You surely did notice that, did you!

  22. Anonymous says:

    Well, it is never too late to walk down the wrong path. Browser sniffing is not the way to go.

    1. Use standards.

    2. Use media queries

  23. Anonymous says:

    Microsoft you making IE10 for only windows 7 and windows 8 is a wonderful idea! that means a faster IE and no more old windows users using microsoft IE.  They might all go to google chrome or firefox 🙂  http://www.google.com/chrome   http://getfirerfox.com/

  24. Anonymous says:

    @tobi: No. In a character class, the only characters that must be escaped are the backslash (), the closed square bracket (]) the caret (^) and the hyphen (-). A dot, in this context, is just a dot (wouldn't make much sense otherwise now, would it?)

    It's advisable to actually check the documentation before making a disparaging comment, especially when the very same point was raised (and contested) just a few comments ago.

  25. Anonymous says:

    I fully agree with Gérard Talbot. Nobody considers anymore "Mozilla/5.0" or "compatible" in User-Agent Strings, I think they are completely useless at now.

  26. Anonymous says:

    My suggestion: "MSIE10"

  27. Anonymous says:

    Hello Microsoft you should change from mozilla to MSIE cause It makes you sound like you are using Mozilla firefox's string..  like Google chrome's string should change to googlechrome    😛   Doing This will stop Crashie.com   forever..  Trust me 🙂  i am the owner..    Mozilla in the string is causing IE to crash.

  28. Anonymous says:

    User Agent String Documentation

    blogs.msdn.com/…/459541.aspx

    The IE7 User-Agent String

    blogs.msdn.com/…/763891.aspx

    The Internet Explorer 8 User-Agent String

    blogs.msdn.com/…/763891.aspx

    Introducing IE9’s User Agent String

    blogs.msdn.com/…/introducing-ie9-s-user-agent-string.aspx

  29. Anonymous says:

    if i choose URL and right click then Firefox and Chrome both give me facility to go to … who's url i selected but this's not included in IE.

  30. Anonymous says:

    Thank you, History Lesson

    > "MSIE 7.0; Windows NT 5.1;"

    > Lets get rid of this "Mozilla/4.0 (compatible" junk please! There is NO point to it …  (…)

    > John A. Bilicki III

    > 2 Sep 2005 1:13 PM

    blogs.msdn.com/…/459541.aspx

    During the next 5 years, a lot of people asked for such string removals.

    And now 5½ years later, we are still demanding the same thing!

    Gérard Talbot

  31. Anonymous says:

    Microsoft this is the time to prove to us that you listen to us all. REMOVE FRICKIN Mozilla/4.0   ALREADY!!!

  32. Anonymous says:

    I think removing the "compatible;" token would improve compatibility, since it's used to detect IE and serve malformed content.

  33. Anonymous says:

    @Geek God Zeus: It would probably help if the site was coded properly instead of just creating JS loop which crashes other browsers too if their user agent string is changed to IE.

  34. Anonymous says:

    The way to go is like this  MSIE 10.0.1.1234 (product+version and no more stuff)

  35. Anonymous says:

    Please consider adjusting the problems relating select tag, such as .innerHTML and others=> throbs.net/…/IE-SELECT-bugs

  36. Anonymous says:

    funny, crashie.com wont crash my ie9 8-0

  37. Anonymous says:

    Sorry for being OT, couldn't helped it. Please fwd to the IE team 😉

    http://www.youtube.com/watch

    These guys are from the mono team, so they don't dislike MSFT.

  38. Anonymous says:

    Funnily enough, Safari, Chrome, Firefox and Opera all prefix their user-agent strings 'Mozilla/5.0', so what's with all this hating towards IE 10 all of a sudden?

  39. Anonymous says:

    On http://test262.ecmascript.org, IE9 fails 276 out of 10872 tests compared to FF4.0.1 fails 296 and IE10prev fails only 3 !! That’s impressive !

  40. Anonymous says:

    @Mihai, that's not true of Opera, at least not of the latest versions running with default settings.

    @DanglingPointer, that does sound impressive!

  41. jabcreations says:

    The user agent should look like this…

    MSIE 10.0; Windows NT 5.2; Trident/6.0

    MSIE 10.0; Windows NT 6.0; Trident/6.0

    MSIE 10.0; Windows NT 6.1; Trident/6.0

    Keep it for compatibility mode, that would make sense though bad habits like this need to stop.

    It would also be nice if Chrome and Safari stopped declaring they were Gecko and KHTML based browsers as they are not. Microsoft is not Mozilla either.

    Also as Eric pointed out years ago that older sites would break…well if they're online they're being hosted and if they're being hosted someone is paying money to keep them online. With the required ICANN notifications about keeping account contact information up to date even if an email address or contact form is not available on the site itself we can still do a whois and contact people who have sites with broken code if need be.

    Broken code should break…because standards compliant code should work. 😉

    Thanks btw to Gérard. 🙂

  42. Anonymous says:

    Chrome sync my password and bookmark through my Google acount. so if i even crash my system or go anywhere else i can use them. if something goes wrong no problem becuase it's safe in IE their is no good way to do bookmark prehaps you nothing make changes from IE6. the same fundamentals i use but nothing found better. well are you planning for making bookmark like Firefox instead of going ot live page in IE.

    so their is hard to keep bookmark and password backup or safe. i found nothing or not any good way to try it in IE9 when  i try so are their any plan to make it usable.

    hope feedback help you [well thing i point you alredy realize] when i find that you use Chrome 12 nighly as same as me in mix11 then i feel that you not your eye close but maybe your thinking for making IE better. no doubt both better in place [chrome and IE]. first thing in IE that every feature should be perfect instead of making blah blah blah( because MSFT with MVP and some other person make lot's of blah and someone create spamming on twitter  , facebook no matter here for that). i know you not make millions of plugin in month but can improve the feature exisitng in IE.

  43. Anonymous says:

    So old sites use this information for browser sniffing: so what?  It's a little bit of junk DNA, and a few bytes extra in a request is not going to bring the Internet down.  Why should IE suddenly break sites that appear to be perfectly good to a user's perspective just to appease some engineering purists?  Also, this is sent in the *request* header, so how is IE supposed to know ahead of time whether the site in question is supposed to be in compatibility mode?

  44. Anonymous says:

    @Mihai

    > Safari, Chrome, Firefox and Opera all prefix their user-agent strings 'Mozilla/5.0', so what's with all this hating towards IE 10 all of a sudden?

    I can not speak for others but I have been trying to be consistently on topic throughout many years in this blog and always trying to propose an alternative or a suggestion to replace whatever is being done in IE. Mentioning what other browsers do may be useful if the related issue discussed is outside the spec. This is the case here with user agent string: there is no known official (ECMA, W3C, IETF, etc) standard for user agent string. Maybe there should be.

    You say "hating" when I would rather say "persistent request for sound, clear and clean user agent string" throughout 5½ years.

    I share your opinion that other browsers have all kinds of irrelevant, unneeded and contradictory strings in their user agent string and navigator object's attributes (eg @RP navigator.appCodeName in latest Opera nevertheless returns the illogical "Mozilla"). Mentioning other browsers' issues and problems here is not useful in this blog and is not really on topic.

    Hello JAB Creations 🙂

    regards, Gérard Talbot

  45. Anonymous says:

    @Gérard – Presumably the reason that all browsers continue to include Mozilla in their user agent strings is because a significant number of sites don't render correctly otherwise. Yes, those sites are badly written, yes it would be nice not to worry about legacy, but unfortunately this is what the real world is like.

  46. Anonymous says:

    @Tom – Those websites are probably *very* old ones and, therefore, they probably need the compatibility mode anyway.

  47. Anonymous says:

    @Tom

    > significant number of sites don't render correctly otherwise. Yes, those sites are badly written (…)

    Which websites are we talking about here? Very old websites? Less than 0.5% of all websites? Unmaintained websites? Websites coded to support Netscape 4 and IE4, IE5.x?

    If a web browser manufacturers agreement gets reached in 2011 between browser vendors/manufacturers (Microsoft, Mozilla, Google, Opera, Apple and KDE) on user agent string and then written into a RFC, then I assure you that "Mozilla/n.0 (compatible;" will disappear in the next major version of browsers. And then, poorly coded websites, badly broken detection websites will fail in all browsers complying with the new RFC.

    Everything needs to be updated and upgraded once or so in a decade: browsers, users' choice of browser (or browser version) and/or websites. If each partners of the web standards equation do what they should be doing, then no one is or will be affected. In the transition, people should be notified and warned accordingly(1). I already – years ago, in this blog – explained all this and how to do this. Microsoft IE dev. team with its "The IE10 User-Agent String" in this blog chose not to go ahead with this, regardless and despite everything we said, repeated, explained and know.

    "

    (…) How about sitting down with the makers of the other browsers (like Opera, Apple, Mozilla, not to mention others) to discuss how they can work together for the common good of the web?

    "

    Al Billings, ex-Microsoft project manager (9 years) for the Internet Explorer team, February 23rd 2008, IE Blog

    blogs.msdn.com/…/the-internet-explorer-8-user-agent-string.aspx

    Gérard Talbot

    (1) In many countries (USA, UK, etc), the TV analogic signal has been *replaced* with digital signal: users/viewers have been warned and notified that they need a converter.

  48. Anonymous says:

    I have no idea how many web sites are affected, but the fact that all browser makers have made the same call makes me assume the number is not insignificant. Suppose one major browser maker (doesn't matter who) decides to get rid of the Mozilla bit "for the good of the web". My prediction is that users of that browser would get upset that *the browser* does not correctly render some sites. And in all likeilhood the web site isn't being actively maintained, so there won't be any developers to notice the problem, let alone fix it. So there doesn't seem to be a lot in it for a browser maker to make this change, and (unless I'm missing something) keeping the legacy stuff in the user agent string is pretty benign.

  49. Anonymous says:

    If sending twenty bytes * number of pages (+files) you download on the web is pretty benign then, yes, "keeping the legacy stuff in the user agent string is pretty benign".

    But if you don't change someday, you never change. Clutters accumulate, and you end up with the Chrome user agent: "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16".

  50. Anonymous says:

    @Tom

    Many years ago, when people relied on user agent string detection to select, to discriminate browser names and browser versions, they did not need (and wouldn't need anyway) to detect "Mozilla" and "compatible". That's not what they did.

    Firefox 3.6+, Opera 11 and Chrome 10 user-agent strings do not have "compatible".

    Opera 11 user-agent string does not have "Mozilla" (albeit navigator.appCodeName returns "Mozilla")

    If a website is unmaintained during years, then chances are (it's more likely) thatt he visitors do not keep coming back.

    Browser manufacturers (Microsoft, Mozilla, Google, Opera, Apple and KDE) just need to start talking to each other and reach a consensus, create an industry standard and issue a RFC on user agent string. And then we'll see the next major releases of those browsers with a clean, compact and standardized user agent string.

    @FremyCompany

    1- "Windows" is even unneedlessly repeated in your quoted Chrome 10 user-agent string.

    2- navigator.appName returns "Netscape" in Chrome 10!

    3- "WebKit", "KHTML" and "Gecko" (all present in Chrome 10 user-agent string) are the names of 3 different and distinct rendering engines: these are pitfalls for user-agent string detection.

    4- Chances are navigator.language in your Chrome 10 returns "fr" while we see "en-US": this is my case, btw. My Chrome 10 GUI is in French but the user-agent string suggests it's in english (en-US). So, at best, it misleads here too.

    regards, Gérard Talbot