长青浏览器和用户代理列表
List of Evergreen Browsers and User Agents
有谁知道网上某个地方的长青浏览器及其相关用户代理的列表?我找不到一个。我知道这并非万无一失,但我想检查用户代理以确保最终用户使用的是常青浏览器。我们不会支持 IE,所以这很容易,因为它不是常青树……我最担心的是 Edge。我相信它一开始并不是常青树,但 MS 通过 Windows 10 更新对其进行了更改...使其常青树。所以我想检查用户代理以确保最终用户没有使用 IE 或 pre-evergreen Edge。这就是为什么我在某处寻找列表,以便我可以看到他们的 UA 的含义。
似乎没有关于长青浏览器列表的官方文档。
我找到了 this link 并且我认为解释很清楚:
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.
我认为您的意思是检测并非常青树的 IE 和 Edge Legacy (EdgeHTML)。您可以使用下面的代码使用 window.navigator.userAgent
:
来检测 IE 和 Edge Legacy
<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>
在上面的代码中,edge
用于 Edge Legacy(在 Edge Chromium 中,它是 edg
),trident
用于 IE。
有谁知道网上某个地方的长青浏览器及其相关用户代理的列表?我找不到一个。我知道这并非万无一失,但我想检查用户代理以确保最终用户使用的是常青浏览器。我们不会支持 IE,所以这很容易,因为它不是常青树……我最担心的是 Edge。我相信它一开始并不是常青树,但 MS 通过 Windows 10 更新对其进行了更改...使其常青树。所以我想检查用户代理以确保最终用户没有使用 IE 或 pre-evergreen Edge。这就是为什么我在某处寻找列表,以便我可以看到他们的 UA 的含义。
似乎没有关于长青浏览器列表的官方文档。
我找到了 this link 并且我认为解释很清楚:
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.
我认为您的意思是检测并非常青树的 IE 和 Edge Legacy (EdgeHTML)。您可以使用下面的代码使用 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>
在上面的代码中,edge
用于 Edge Legacy(在 Edge Chromium 中,它是 edg
),trident
用于 IE。