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
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:
Rails/Ruby
request.user_agent =~ /Trident/
Use the useragent gem for additional detection support.
Express/NodeJS
let http = require('http'),
server = http.createServer(function(request) {
let isIE = /Trident/.test(request.headers['user-agent']);
});
Use the express-useragent middleware for Express/NodeJS apps.
Browsers
/Trident/.test(navigator.userAgent);
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.
I'm sure you have tips and tricks for identifying and migrating IE users.
How do you do it?