简体   繁体   English

检测浏览器是否支持Ember.js

[英]Detect whether a browser supports Ember.js

I want to detect whether a browser supports the Ember.js library. 我想检测浏览器是否支持Ember.js库。 If not, I will show users a message to let them download the latest version of their browser. 如果没有,我将向用户显示一条消息,让他们下载最新版本的浏览器。 How can I do that? 我怎样才能做到这一点?

There is an answer to a similar question contributed by an Ember.js core team member. 由Ember.js核心团队成员提供的类似问题的答案。

In it, he states that the majority of the browsers on browserstack.com are supported, meaning they do thorough testing. 他在其中指出,支持browserstack.com上的大多数浏览 ,这意味着它们已经进行了全面的测试。

Rather than show the message based on a functionality test of the user's browser each time they load your application, I suggest you instead build a list of known incompatible browsers (anything older than what is on BrowserStack would be a good start) and expand it based on monitoring your access logs or reported issues from the likely minority users on unsupported browsers. 我建议您建立一个已知的不兼容浏览器列表(任何比BrowserStack都旧的版本才是一个好的开始),然后基于它进行扩展,而不是基于每次用户加载应用程序时对浏览器的功能测试都显示该消息。在不受支持的浏览器上监视访问日志或可能的少数族裔用户报告的问题。

That "blacklist" approach would serve most efficient, as Ember.Js and other libraries like jQuery are usually designed to continually support all new browsers. 这种“黑名单”方法将最有效,因为Ember.Js和其他类似jQuery的库通常被设计为持续支持所有新浏览器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM