DEV Community

Cover image for Github Engineer Explains How to Drop IE Support — Gracefully

Posted on • Updated on

Github Engineer Explains How to Drop IE Support — Gracefully

GitHub dropped support for Internet Explorer last summer.
I asked a GitHubber what teams should know to successfully transition their users away from IE.

David Graham answered my call with these tips.
If you find them helpful, thank him on Twitter or donate to BlackGirlsCode.

Render a Support Banner Server-Side

IE Support Banner

GitHub's support banner is rendered server-side.
It's rendered sever-side to ensure that it's seen.
Bad JavaScript can halt script execution, preventing code from ever running.
So a message rendered client-side may never get executed.

This is bad if you're attempting to notify users that their browser doesn't support the JavaScript you need.
A client-side message might go unseen by precisely the users who need it.

Render a support banner server-side.

Check the User-Agent string for Trident

Trident is the engine that powers IE.
Check the request header's user-agent string for Trident.

How you check the user-agent depends on your server technology.
Here's the short version of what we did:


  request.user_agent =~ /Trident/
Enter fullscreen mode Exit fullscreen mode

Use the useragent gem for additional detection support.


  let http = require('http'),
      server = http.createServer(function(request) {
          let isIE = /Trident/.test(request.headers['user-agent']);
Enter fullscreen mode Exit fullscreen mode

Use the express-useragent middleware for Express/NodeJS apps.


Enter fullscreen mode Exit fullscreen mode

Beware of Meddlesome Browser Extensions

Some folks have browser extension that modify their user-agent string.
These extensions are often used to access old apps that are "best in IE".

Unfortunately, this means that the user-agent sniffing strategy could yield false positives.

To combat these extensions, do a little feature detection on the client.
For example:
IE doesn't support navigator.mediaDevices.
If it's present, you user's browser might be lying to you.

Have your server-rendered banner run a few client-side checks.
If you suspect a browser of meddling, trigger a support ticket and handle these cases on an individual basis.

Don't Pull Your Polyfills on Day One

Be patient with your users.
Don't be too eager to yank the rug out from under them.

Continue to offer support well after your deadline.
Your users will appreciate the extra care.

🕸 chantastic

I'm sure you have tips and tricks for identifying and migrating IE users.
How do you do it?

Top comments (4)

cheston profile image

Very informative!
We'll need this for safari soon.

chantastic profile image

too real!

in my write up at work i had to be super explicit: "this does nor mean we stop testing legacy browsers. it's just that the browser is now Safari"

i'm not sure it'll stick 😅

chantastic profile image

Sounds awesome! I hope that you get to use it one day.

When I was getting our plan cleared thru our Ops Team, one of the leads asked "can't we just reject them at the load balancer?" 🤣