Skip to content

Instantly share code, notes, and snippets.

@weblancaster
Created July 2, 2014 18:26
Show Gist options
  • Save weblancaster/6789e76276801329893e to your computer and use it in GitHub Desktop.
Save weblancaster/6789e76276801329893e to your computer and use it in GitHub Desktop.
javascript IE and IE11 detection
function isIE() { return ((navigator.appName == 'Microsoft Internet Explorer') || ((navigator.appName == 'Netscape') && (new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null))); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment