Skip to content

Instantly share code, notes, and snippets.

@bongofury
Created January 7, 2021 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bongofury/87a6197d3461d0c0cf8327e42bb081b8 to your computer and use it in GitHub Desktop.
Save bongofury/87a6197d3461d0c0cf8327e42bb081b8 to your computer and use it in GitHub Desktop.
Super simple IE browser check
const ua = window?.navigator?.userAgent;
if (ua && (ua.indexOf('MSIE') > -1 || ua.indexOf('Trident/') > -1)) {
console.log('IE 😢');
} else {
console.log('Happy surfing! 🙂')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment