I know you should do feature detection where possible, but can you detect in Javascript if the browser is the Microsoft Edge browser?
I maintain an old product and I
The snippet that I have here is also copy from SO too, am sorry that I could not give you reference for the original code, but I have modified it so here it is for those of you looking for snippet to check for IE 11 and MS Edge Window 10:
var get_ie_version = function () {
var sAgent = window.navigator.userAgent;
var Idx = sAgent.indexOf("MSIE");
// If IE, return version number.
if (Idx > 0) {
return parseInt(sAgent.substring(Idx+ 5, sAgent.indexOf(".", Idx)));
}
// Condition Check IF IE 11 and or MS Edge
else if ( !!navigator.userAgent.match(/Trident\/7\./)
|| window.navigator.userAgent.indexOf("Edge") > -1 )
{
return 11;
} else {
return 0; //It is not IE
}
};