You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My user agent on macos is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 Edg/83.0.478.56
It is the same on windows too.
I propose changing the regex to: var match = userAgent.match(/edg\/(\d+)/);
The text was updated successfully, but these errors were encountered:
This is because the newer versions of Edge are essentially Chromium now, and Microsoft changed the user agent to Edg to avoid inconsistencies with detecting the Spartan and Chromium user agents.
Given the reason why #214 was closed, I would wager that it would be acceptable that is.edge() returns false and is.chrome() returns true. I use is.ie() || is.edge() to detect cases where a user is using either IE or Edge Spartan, so if Edge Chromium were to be "fixed" I would personally prefer another function like is.edgeChromium() to detect newer versions of Edge instead.
This is because the regex is:
var match = userAgent.match(/edge\/(\d+)/);
Whereas the user agent chosen by microsoft is edg. (see here https://docs.microsoft.com/en-us/microsoft-edge/web-platform/user-agent-string).
My user agent on macos is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36 Edg/83.0.478.56
It is the same on windows too.
I propose changing the regex to:
var match = userAgent.match(/edg\/(\d+)/);
The text was updated successfully, but these errors were encountered: