Forum Discussion

HereItis's avatar
HereItis
Brass Contributor
Apr 01, 2020
Solved

Fix sites detecting MS Edge as a Google Chrome browser

Like others I find most of the browser detecting sites report that we are using a Google Chrome Browser that's really annoying. Now this is a problem. We love MS Edge and sites should also show what ...
  • HotCakeX's avatar
    HotCakeX
    Apr 02, 2020

    HereItis 

     

    Okay I actually found out why those websites are showing the incorrect browser:

    1. They are old.
    2. Those website developers haven't updated the code in their websites to detect the new Edge browser which has a different UA.

     

    https://blogs.windows.com/msedgedev/2019/04/08/microsoft-edge-preview-channel-details/

     

     

    User Agent String

     

    With Microsoft Edge adopting Chromium, we are changing our user agent string to closely resemble that of the Chromium user agent string with the addition of the “Edg” token. If you’re blocking site access on user agent strings, please update your logic to treat this string as another Chromium-based browser.

    Below is the user agent string for the latest Dev Channel build of Microsoft Edge:

     

     

    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.48 Safari/537.36 Edg/74.1.96.24

     

     

    We’ve selected the “Edg” token to avoid compatibility issues that may be caused by using the string “Edge,” which is used by the current version of Microsoft Edge based on EdgeHTML. The “Edg” token is also consistent with existing tokens used on iOS and Android. We recommend that developers use feature detection where possible and avoid browser version detection through the user agent string, as it results in more maintenance and fragile code.

     

     

     

Resources