Skip to content

Instantly share code, notes, and snippets.

@mosesoak
Last active March 6, 2021 00:01
Show Gist options
  • Save mosesoak/084c634b33705dacd0cd9df9f06e1476 to your computer and use it in GitHub Desktop.
Save mosesoak/084c634b33705dacd0cd9df9f06e1476 to your computer and use it in GitHub Desktop.
MSIE Blocker Script (vanilla)
<head>
<script type="text/javascript">
// Show a blocking message on MSIE
// (documentMode is an IE-only property, versions 8-11)
if (typeof window !== 'undefined' && window.document.documentMode) {
window.onload = function () {
document.body.innerHTML =
'Internet Explorer is no longer supported.<br /><br />Please visit this site on Edge or Chrome.';
document.body.style.cssText =
'text-align: center; padding-top: 40vh; font-family: Sans-Serif;';
};
}
</script>
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment