JavaScript库来检测浏览器的功能/插件 [英] JavaScript libraries to detect browser capabilities/plug-ins

查看:134
本文介绍了JavaScript库来检测浏览器的功能/插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一个(preferably开放源码)JS库,以确定有关用户的Web浏览器环境,尽可能详细的信息。我知道这是可能得到这样的数据:

I'm trying to find a (preferably open source) JS library to determine as much information as possible about the user's Web browser environment. I know it's possible to get such data as:


  • 屏幕分辨率,

  • 用户代理,接受语言,通常在HTTP头发送其他preferences,

  • 已安装的插件(通过 navigator.plugins ),

  • 是否支持特定的浏览器功能(支持SVG,DOM功能)

我正在寻找的是收集这些信息,并使其在一个共同的跨浏览器界面中可用的库(有在浏览器中如何报告已安装的插件,比如一堆incompatibilties的)。我发现 Modernizr的它可以检测HTML5相关的功能,但报告更通用的信息类似项目,如数据以上所列,会更加有用。

What I'm looking for is a library which gathers such information and makes it available under a common cross-browser interface (there are a bunch of incompatibilties in how browsers report installed plugins, for example). I found Modernizr which can detect HTML5-related functionality, but similar projects which report more generic information, such as the data listed above, would be more useful.

推荐答案

我保持普通功能测试的项目,但它仅仅是一组特征的测试线上,而不是一个库。随意使用其中的任何页面上。

I maintain Common Feature Tests project, but it is merely a set of feature tests online, not a library. Feel free to use any of them on your page.

有时我也用这个简单的测试页面测试未知环境(所有测试有真是小巫见大巫单行)。

Sometimes I also use this simple test page for testing unknown environments (all tests there are really trivial one liners).

这篇关于JavaScript库来检测浏览器的功能/插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆