Skip to content

Instantly share code, notes, and snippets.

@jniemann66
Created October 3, 2016 22:12
Show Gist options
  • Save jniemann66/feef9d790bd7c11462957bac5fb64d8f to your computer and use it in GitHub Desktop.
Save jniemann66/feef9d790bd7c11462957bac5fb64d8f to your computer and use it in GitHub Desktop.
detecting Internet Explorer
function isBrowserIE() {
var ua = window.navigator.userAgent;
var rv = false;
if (ua.indexOf('MSIE ') > 0) { // IE 10 or older
rv = true;
}
if (ua.indexOf('Trident/') > 0) { // IE 11
rv = true;
}
return rv;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment