Why Microsoft Internet Explorer 11 Is the Worst Thing That Could Happen to Us

A web developer's rant about the nightmare of supporting 20+ different IE rendering modes, broken compatibility lists, and Microsoft's delusional user-agent decisions.

I recently wrote a comment saying that Microsoft should have long ago stopped tormenting web developers and switched to the Gecko engine. Many people apparently took it as an inappropriate joke; however, it's not a joke at all but a statement of fact. Those who disagree probably haven't tried developing for this wonderful browser yet.

Let me tell you what a wonderful process that is.

How many browsers do you support, dear developers? Not so long ago, five years back, the list was pretty straightforward: IE6, IE7, Opera, Firefox, Chrome. Five browsers, plus some minor variations between Firefox 2 and 3 and Opera 9 and 10.

How many browsers do we support now?

Firefox, Chrome, and Opera haven't gone anywhere. Firefox and Chrome long ago switched to a short release cycle, and the last artifact of non-automatic updates (Firefox 3.6) has finally disappeared from the radar. Opera should switch to the same cycle soon — and the last versions of Opera/Presto didn't cause much of a headache anyway. Yandex.Browser was added, which is essentially the same Chromium under the hood, though it updates less frequently.

And finally, regarding IE: how many versions of IE are we forced to support? In October, according to li.ru, the shares of different Internet Explorer versions in the Russian internet were as follows: IE10 — 4%, IE8 — 2.3%, IE9 — 1.7%, IE7 — 0.7%, plus the barely visible IE11 which, with the release of Windows 8.1, should capture some share from IE10. So it seems like one or two browser versions if you're willing to sacrifice 4.7% of your audience, or three to five if you're not — or if you happen to be building a product for a country with a higher IE share.

Not so fast! Listen carefully.

Internet Explorer, starting from — Lord have mercy — version 8, ships with a set of engines from previous versions. IE8 can work in IE7 mode and in Quirks Mode (effectively IE5.5!). IE9 can work in modes 9, 8, 7, and Quirks. IE10 can work in modes 10, 9, 8, 7, and Quirks. IE11 can work in modes 11, 10, 9, 8, 7, and Quirks. And pay attention — these are DIFFERENT engines! I don't know what they were smoking when they made this decision, but IE10 mode in IE11 is NOT the same as IE10! For example, in IE9-10 there's a bug with incorrect canvas positioning on z-index that could be fixed by setting background-color: rgba(255, 255, 255, 0) on it. In IE11's IE10 mode, this bug was carefully ported by the wonderful developers in Redmond, but they forgot to port the workaround, so now you basically can't use a canvas with absolute positioning there. At all.

So, if you happen to be writing some library or just want to reuse code across different domains, you need to support (how many?) TWENTY different versions of Internet Explorer right now! Twenty versions of a browser used by less than 10% of the audience! For reference, Firefox has had 28 major releases in its entire existence, Chrome — 32.

And that's just the beginning, folks. The spirit of the old school is incredibly strong in Redmond: all these versions of Internet Explorer will be supported by Microsoft for (how long?) 10 years! Here's an entertaining mental math problem: calculate how many versions of IE we'll have to support in 5 years.

Paul Irish wrote a great article about this back in 2011: www.paulirish.com/2011/browser-market-pollution-iex-is-the-new-ie6/. But even he couldn't predict the full extent of Microsoft developers' insanity.

What?! There's More?!

It's far from over, my little red-eyed friends. In IE10-11, Microsoft presented yet another small truckload of fresh and revolutionary ideas.

Let's start with the fact that IE11 ships with this user agent string:

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

What's beautiful about it? It DOESN'T CONTAIN THE VERSION of Internet Explorer itself! The words "MSIE" are gone entirely. Do you know why? Because Microsoft believes that their browser — pay attention — doesn't need to be detected by user agent, since it supports all the latest standards and doesn't need to be distinguished from other modern browsers.

Let me repeat that: the developers of a browser that ships with 6 different engines emulating bugs from previous versions of that browser going back to 1999 claim that it doesn't need to be detected by user agent.

Meanwhile, the very same people between the last Developer Preview of IE11 and the final RTM release go ahead and rip out vendor prefixes and break a couple dozen more backward compatibilities, which they kindly announce on their MSDN page: msdn.microsoft.com/en-us/library/ie/dn304886(v=vs.85).aspx

Yes, that's right. If your code works perfectly in the Developer Preview, that absolutely doesn't mean it will work in the release version, which will suddenly be rolled out to tens of millions of people around the world all at once. But by all means, don't do user-agent version detection!

Forget the Developer Preview. In their wonderful creation, you need to distinguish the OS version it's running on! I'm serious.

So there are people sitting around. Their job title probably says something like Senior Software Architect. They design the PointerEvents standard, with everything done properly and by the book — a special navigator.pointerEventsEnabled flag shows whether the browser supports pointer events or not. So that, you know, nobody detects anything by user agent, and everything works like in normal browsers.

And then it suddenly turns out that the same people's gesture handling crashes in IE10 on Windows 7. It's literally written right there on MSDN:

Note The APIs we discuss in this section aren't supported in Windows 7 or earlier.

msdn.microsoft.com/en-us/library/ie/dn433243(v=vs.85).aspx

So in addition to 20 different versions of IE, you have at least two different OS versions — Win7 and Win8. In reality, there are more — there's also Windows Phone and Windows RT, and Windows 8 also has two browser modes — Metro and Desktop. They're all different. We were lucky — we didn't find any particularly notable bugs that would require maintaining separate code branches for these OS variants. You might not be as lucky. So, how many versions of IE do we have now? I've already lost count, but probably around a hundred.

And now — dessert! Suppose you're just building web pages, you don't care about browser modes, and you're generally wondering what the fuss is about — a website can't switch itself into some compatibility mode, right?

I have bad news for you, folks. Go here:

iecvlist.microsoft.com/ie10/201206/iecompatviewlist.xml

And search for your site there.

Do you know what this is? This is a global Compatibility List that includes websites which, in Microsoft's opinion, need to be displayed in one of the compatibility modes.

No, seriously, they review the entire Internet and compile a registry of sites that have been misbehaving!

Do you know how sites end up on this list? Microsoft releases preview versions of their browsers. These have a special button in the address bar — "show this site in compatibility mode." Microsoft collects anonymous statistics — if people click that button often enough, the site gets added to the registry.

Seriously, they don't even hide it. They seem to be even a little proud of it.

msdn.microsoft.com/ru-ru/library/gg699485(v=vs.85).aspx

Getting out of this list is very simple — just write to Microsoft support. Sure.

And the cherry on top: suppose I've convinced you and you're controlling which mode to display the page in using a special meta tag to avoid unnecessary problems. Well, in IE11 (at least in the RTM version — I'm too lazy to check right now), it doesn't work — being on the compatibility list takes priority over the X-UA-Compatible set by the webmaster!

Dear Microsoft! Please stop tormenting us and stick the Gecko engine into your so-called product.