问题描述
任何人都知道找到类型&的好而可靠的方法.使用JavaScript/jQuery在客户端上安装的浏览器的版本?
Anyone knows of a good and reliable way to find out type & version of a browser installed on client either using JavaScript/jQuery?
看起来jQuery具有一些内置功能,但是在检测Chrome时遇到了问题.还有其他可靠的方法吗?
Looks like jQuery has some built-in functions, but it is having problems in detecting Chrome. Any other reliable way of doing it?
推荐答案
如果您想要有关访问者使用的浏览器的信息,并将其用于统计或向用户显示信息,则可以使用 jQuery浏览器插件.
If you want information about the browser that your visitor uses, and use it for statistics or displaying information to the user, you can use the jQuery Browser Plugin.
请确保执行功能检测,而不是浏览器检测,当您想确定某个功能是否在浏览器中可用,应用错误修正等时.
Be sure to do feature detection instead of browser detection when you want to determine if a certain feature is available in a browser, apply bugfixes, etc.
无需重新发明轮子.
这篇关于查找浏览器类型和版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!