Search code examples
javascriptbrowsermicrosoft-edgeuser-agent

List of Evergreen Browsers and User Agents


Does anyone know of a list of evergreen browsers and their associated user agents somewhere online? I could not find one. I know it is not foolproof, but I want to do a check of user agents to ensure the end user is utilizing an evergreen browser. We are not going to be supporting IE, so that one is easy since it is not evergreen...my largest concern is Edge. I believe that started out as not being evergreen, but MS made a change to it with a Windows 10 update...making it evergreen. So I want to check user agents to ensure the end users are not using IE or pre-evergreen Edge. That is why I was looking for a list somewhere so I can see what their UA's entail.


Solution

  • It seems that there's no official docs about Evergreen Browser list.

    I found this link and I think the explanation is clear:

    The term "evergreen" refers to the release strategy. Evergreen browsers are updated frequently in background, constantly updating their compliance with Web Standards and also adding proprietary features.

    I think your point is to detect IE and Edge Legacy (EdgeHTML) which are not evergreen. You can use the code below to detect IE and Edge Legacy using window.navigator.userAgent:

    <script>
        var browser = window.navigator.userAgent.toLowerCase();
        if (browser.indexOf("edge") > -1 || browser.indexOf("trident") > -1) {
            alert("We don't support IE and Edge Legacy");
        }
    </script>
    

    In the code above, edge is for Edge Legacy (in Edge Chromium, it's edg), trident is for IE.