What is the User Agent string name for Microsoft Edge?

Microsoft Edge UA string: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136 I detail why in this blog post. Neowin recently reported that Microsoft’s new browser for Windows 10, Spartan, uses the Chrome UA string, “Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0″. That is done on purpose. … Read more

includes() not working in all browsers

If you look at the documentation of includes(), most of the browsers don’t support this property. You can use widely supported indexOf() after converting the property to string using toString(): if ($(“.right-tree”).css(“background-image”).indexOf(“stage1”) > -1) { // ^^^^^^^^^^^^^^^^^^^^^^ You can also use the polyfill from MDN. if (!String.prototype.includes) { String.prototype.includes = function() { ‘use strict’; return … Read more

Why does Microsoft Edge open some local websites, but not others, where the domain name is routed to 127.0.0.1 in hosts file

Your network can block loopback as a security measure in Windows 10. Open a command prompt as administrator, and run this to exempt Edge from a loopback: CheckNetIsolation LoopbackExempt -a -n=”Microsoft.MicrosoftEdge_8wekyb3d8bbwe” (Microsoft.MicrosoftEdge_8wekyb3d8bbwe is the identifier for the Edge app) There’s a blog post here giving more detail: https://blogs.msdn.microsoft.com/msgulfcommunity/2015/07/01/how-to-debug-localhost-on-microsoft-edge/

How can I detect Internet Explorer (IE) and Microsoft Edge using JavaScript?

Here is the latest correct way that I know of how to check for IE and Edge: if (/MSIE 10/i.test(navigator.userAgent)) { // This is internet explorer 10 window.alert(‘isIE10’); } if (/MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent)) { // This is internet explorer 9 or 11 window.location = ‘pages/core/ie.htm’; } if (/Edge\/\d./i.test(navigator.userAgent)){ // This is Microsoft Edge window.alert(‘Microsoft … Read more

How to target Microsoft Edge with CSS? [duplicate]

To target Edge (version < 79), we can check for -ms-ime-align support, Edge being the only Microsoft browser that supports this property: @supports (-ms-ime-align: auto) { .selector { color: red; } } Or this one-liner (that one works on Edge and all IEs also): _:-ms-lang(x), .selector { color: red; } Further explanation, including variants to … Read more