Skip to content

Instantly share code, notes, and snippets.

@bootsified
Last active August 7, 2018 20:27
Show Gist options
  • Save bootsified/1fc23852b38df40138f2b1c709e601e2 to your computer and use it in GitHub Desktop.
Save bootsified/1fc23852b38df40138f2b1c709e601e2 to your computer and use it in GitHub Desktop.
Dirty browser sniffing for IE and Edge that you should never use... unless you're nasty.
function isIEorEDGE() {
return navigator.appName == 'Microsoft Internet Explorer' || (navigator.appName == "Netscape" && (navigator.appVersion.indexOf('Edge') > -1 || navigator.appVersion.indexOf('Trident') > -1));
// return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment