DEV Community

Cover image for What To Expect When You're Expecting To Drop IE11 🗑️

What To Expect When You're Expecting To Drop IE11 🗑️

Sam Thorogood on June 17, 2019

So you've decided to drop support for IE11 and move onto evergreen browsers only (IE11 is only about ~2% globally). That's great! 🌲 With that in m...
Collapse
 
agronick profile image
Kyle Agronick

Developers should stop supporting these unmaintained browsers and force users into a better, faster, and more modern experience. Too much time and energy is spent on supporting browsers that people are using simply because they don't know any better.

If seeing the message "Your browser is not supported" was a common occurrence people would stop using IE 11. Instead we punish everyone sending out bloated transpiled and polyfilled code just to placate the tiny minority using browsers half a decade old.

Collapse
 
samthor profile image
Sam Thorogood

I agree, but I also can't stress this enough: if your site is mostly content, then just ship content. For me and my projects at Google, this happens by only shipping <script type="module"> code. Everyone else gets the basic HTML version.

Collapse
 
agronick profile image
Kyle Agronick • Edited

I'm doing something similar with Vue. The modern mode flag makes it easy. It creates two builds. Using the module and nomodule fags IE users get transpiled code and everyone else gets just minified code.

I've found that its not foolproof though. It can generate some wierd errors when it converts a generator into a jumbled mess of semi-equivalent functions. Luckily I don't have to worry about it. I got the go-ahead to drop IE. Giving them the transpiled code is literally all we are doing for them. If it breaks, its not an issue.

IE users see a big warning on a login screen telling them in no uncertain terms that their browser will not work. Its kind of disheartening how many lines I still see in the server logs with "Trident". I don't know why these people are so stubborn and insist on using a slow browser on a website that tells them that they will experience errors on that site.

Collapse
 
peiche profile image
Paul

Using XHR instead of the fetch API is not out of the question. Fetch isn't a 1:1 replacement, and as Chris Ferdinandi points out, requires two functions just to get the data in readable form. (In the first then() the data is in a stream.) Another great post by Glenn Stovall demonstrates how to write a small ajax function using XHR without any third party libraries.

Collapse
 
samthor profile image
Sam Thorogood

You're not wrong, and the extra step is a bit misunderstood, although important if you want to stream large binary files (I used it in this PWA demo to show a %—blink and you'll miss it).

I have a few unrelated thoughts:

  • await makes the flow much nicer than Chris' examples
  • I'm also surprised neither link uses onload, instead using the more confusing onreadystatechange (and this is actually a vote for XHRs).
  • the lack of support for responseType = 'json' in IE11 actually makes XHRs more confusing, since you just can't safely use that parameter and you have to add a JSON.parse call too
Collapse
 
bennypowers profile image
Benny Powers 🇮🇱🇨🇦

Very nice list.

Don't forget Custom Elements and Shadow DOM, which I think merit a place on this list since with Edgium, they're supported on all the Evergreens.

Collapse
 
samthor profile image
Sam Thorogood

I'm avoiding Edgium. I think dropping IE11 gives you a big enough list that it's interesting right now.

Collapse
 
samthor profile image
Sam Thorogood

This echoes lots of developer stories, sadly. On the flipside, I think primitives like Grid are so good now that many devs are just honestly forgetting about IE11.

And at least for CSS, IE11 will still serve, even if none of the elements are in the right place. And if your JS is done right for content sites, IE11 will still be readable!

Collapse
 
bennadel profile image
Ben Nadel

Wow, truly a great write-up. I just decided to drop IE11 support (only something like 0.3% of traffic on my blog); and, it's awesome to see all the stuff that I can start using with abandon. Also gave me some topics to dig into - I'm familiar with most of what you wrote, but definitely some features here (like beacon) that I had never heard of before. Thanks!

Collapse
 
kristijanfistrek profile image
KristijanFištrek

Loving this!

Collapse
 
chris_bertrand profile image
Chris Bertrand

srcset nice!