Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

If you spoof your user agent, or use IE11, you don't get redirected to the "crying" page (the page uses 301 redirection BTW).

  Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko
Also worth noting, an excerpt from the IE blog[1]:

  Obviously, maintaining Compatibility View Lists requires a significant investment
  on the part of the IE team—resources which could be used to implement more
  new standards, performance improvements, etc. Please please please: use
  feature detection rather than User-Agent sniffing.
If the IE team doesn't want people to use UA sniffing, they should teach by example.

[1]: http://blogs.msdn.com/b/ieinternals/archive/2013/09/21/inter...



sort by: page size:

Sadly, it's complicated.

Read more here: http://blogs.msdn.com/b/ieinternals/archive/2013/09/21/inter...

But the default is:

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


IE compatibility mode is broken. It has two "modes", one of which changes the user agent version and one that doesn't (but still changes the functionality of the browser). Guess where the sniffer scripts get the version from.

The only way to make it work reliably is to look at the window.documentMode property which requires changing your code, thus defeating the point of the compatibility mode in the first place.


Did you really require UA sniffing, though? There are other methods for detecting IE11, both for JS and CSS.

so is this the ie11 user agent matching thing?

That won't work since IE11 because it no longer contains IE or MSIE in the useragent.

May I ask you to get rid of this CV list altogether? We don't live in the walled garden Aol envisioned. Don't you agree that everyone hitting the same browser should see the same UA string.

    Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko
If not, can you please elaborate on this:

> If you currently use the x-ua-compatible header to target a legacy document mode, it's possible your site won't reflect the best experience available with IE11. For more info, see modern.ie. ?

If a site is on the list and they declare "edge", will they see the real ua string? What can someone on the list do to get the real ua string?


IE11 normally sends "Trident/7.0" and not "MSIE". Apparently Microsoft has added "google.com" to the Compatibility View List [1], which means IE11 now sends Google a User Agent that does include "MSIE". Google is interpreting this to mean it's an old version of IE, and sending the legacy view. You can manually disable the CVL, but then other sites that Microsoft has determined need old versions of IE won't work. I suspect Google will update their UA regexp soon, and this will be fixed, but it does sound like a Microsoft bug.

[1] http://msdn.microsoft.com/en-us/library/gg699485(v=vs.85).as...

(I work for Google, on unrelated things.)


There is not supporting IE, and there is blocking IE.

You are blocking IE - I know because I changed my user agent on my firefox browser and you blocked me, and that is not cool!

You don't even offer an option to let me try anyway!

Use feature detection if you must, ignore IE completely in testing if you wish, but do not actively block it or you are just as bad as those who only support IE.


AFAIK, Internet Explorer 10 user agent string starts with "Mozilla" ;-)

For me it correctly reports it as IE11. I am also using it in modern mode and have the exact same user agent string.

That’s their own fault. No one needs to “detect” random esoteric browsers. Once you have 4/5 detections you should be good. IE8’s UA hasn’t changed in forever, so you could just copy-paste one of the many regexes online and keep it unchanged.

No, I specifically meant "not supported correctly" -- as in, because of UA sniffing, you're given an old obsolete interface despite IE11 supporting the features that site needs.

After struggling a lot with the browser specific hacks to target IE/Webkit/Whatever, I have now switched to CSS browser selector [1] and never looked back. It simply saves a lot of time and effort. If you think about it, the User Agent String is the only accurate information that can be used to sniff the browser name and version, not some random CSS hack.

BTW the article is mostly useless for any practical use. If you really want to target IE6/IE7, this article [2] is a nice start. Learn about what types of bugs IE support and try to remember the name of the bug so that you can google a fix for it when you actually encounter one. As others suggested here, try to understand at least the basics of box model and how it is different in IE, but don't try to get a PhD in any IE bug you encounter. Fix it as fast as you can using whatever easy way out you can see an move on. There are better things to do in life.

[1] https://github.com/rafaelp/css_browser_selector/

[2] http://www.virtuosimedia.com/dev/css/ultimate-ie6-cheatsheet...


Because IE has "special needs". Very often different stylesheets or even different markup is served for IE. This could be circumvented by faking IE with the user-agent string but ideally it would just support IE out of the box.

This isn't really Microsoft- or IE-specific. Opera does this too:

http://www.opera.com/docs/browserjs/

Chrome also added special handling to work around poor browser sniffing in Hotmail, which is ironic because Opera had to do the same for Google Docs. Opera claims that most of what they have to deal with is actually improper browser sniffing on sites that didn't work in a previous version of Opera but work fine now. Looking at Microsoft's list of sites, it seems to be a similar story, many sites have IE-specific code that isn't necessary in IE9.


TL;DR

MS doesn't want isIE() javascript functions to return true for IE11. While feature detection is a better practice than browser detection, you can search for "Trident" in the user agent string instead of "MSIE" if you must.


Clearly IE is less evil than we thought :)

Seriously though, if you have evil IE-compatible rules I'll gladly add them. It just wasn't worth my effort to boot a VM to test these in IE, or even look up whether they were supported.

Some of these could be fun: http://msdn.microsoft.com/en-us/library/ms532847(v=vs.85).as...


Except Internet Explorer.

http://www.useragentstring.com/pages/useragentstring.php?nam...

IE version 6: Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.1)

IE version 10: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)

IE versi--wait, what (?!): Mozilla/1.22 (compatible; MSIE 10.0; Windows 3.1)

That last one made me wonder if someone was trolling an auto-collection system or if a zero somehow got added by a Network™. Offtopic but had to add it.


From the source code: http://www.focusontheuser.org/dontbeevil/script.js

if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { alert( "Unfortunately, this tool does not currently work in Internet Explorer. " + "Please try another browser such as Firefox, Chrome, or Safari."); return; }

That's not very nice. Surely this can be made to work for at least IE9 :)

next

Legal | privacy