浏览器HTTP_USER_AGENT汇总——Firefox、Chrome、IE9、IE8、IE7、IE6

来源:互联网 发布:sql server error 40 编辑:程序博客网 时间:2024/06/07 23:27


结论:

一、IE 浏览器

而IE各个版本典型的userAgent如下:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2)
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)

IE8的User-Agents:详细说明如下:

IE8 on Windows Vista (兼容浏览)

 

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0)

IE8 on Windows Vista
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)

IE8 on Windows 7
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)

64-bit IE on 64-bit Windows 7:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0)

32-bit IE on 64-bit Windows 7:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0)
其中,版本号是MSIE之后的数字。

二、Firefox 浏览器
Firefox几个版本的userAgent大致如下:
Mozilla/5.0 (Windows; U; Windows NT 5.2) Gecko/2008070208 Firefox/3.0.1
Mozilla/5.0 (Windows; U; Windows NT 5.1) Gecko/20070309 Firefox/2.0.0.3
Mozilla/5.0 (Windows; U; Windows NT 5.1) Gecko/20070803 Firefox/1.5.0.12
其中,版本号是Firefox之后的数字。

FireFox修改User-agent
方法1: 在地址栏输入“about:config”,按下回车进入设置菜单。
找到“general.useragent.override”,如果没有这一项,则点右键“新建”->“字符串”,输入这个字符串。
将其值设为自己想要的UserAgent。
方法2:安装插件:User Agent Switcher
三、Opera 浏览器
Opera典型的userAgent如下:
Opera/9.27 (Windows NT 5.2; U; zh-cn)
Opera/8.0 (Macintosh; PPC Mac OS X; U; en)
Mozilla/5.0 (Macintosh; PPC Mac OS X; U; en) Opera 8.0
其中,版本号是靠近Opera的数字。

Opera修改User-agent
方法1:
1.工具栏“Tools”->“Preferences”->“Content”->“Advenced”,点击“Manage Site Preferences”按钮。
2.点击“Add”按钮,在弹出的窗口中“Site”填入“*”,“Network”选项卡中选择浏览器ID。各选项如下:
0 Default
1 Opera
2 Mozilla, Opera detectable
3 Internet Explorer, Opera detectable
4 Mozilla, Opera hidden
5 Internet Explorer, Opera hidden
方法2:
1.在地址栏输入“opera:config”,回车打开。
2.找到“User Agent”点开,里面的“Spoof UserAgent ID”设置想要的值,范围1-5,具体对应的ID同上。

四、Safari 浏览器
Safari典型的userAgent如下:
Mozilla/5.0 (Windows; U; Windows NT 5.2) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13
Mozilla/5.0 (iPhone; U; CPU like Mac OS X) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93 Safari/419.3
其版本号是Version之后的数字。
Safari修改User-agent
1.菜单栏“Edit”->“Preferences”->“Advanced”,勾选“Show Develop menu in menu bar”。

五、 Chrome 浏览器
Chrome的userAgent是:
Mozilla/5.0 (Windows; U; Windows NT 5.2) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13
其中,版本号在Chrome之后的数字。
Chrome修改User-agent
方法一:启动时加上参数:–user-agent=”你自己的UserAgent”
方法二:修改chrome.dll。把里面疑似UserAgent的字符串改为自己的。

六、Navigator 浏览器
目前,Navigator的userAgent是:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080219 Firefox/2.0.0.12 Navigator/9.0.0.6
其中,版本号在Navigator之后的数字。
七、Maxthon(遨游)修改User-agent
工具栏“工具”->“遨游设置中心”->“高级选项”,勾选“自定义 UserAgent 字符串”,下面写上自己的UserAgent记可。保存设置后重启Maxthon生效。


from: http://www.cnblogs.com/haitao-fan/archive/2013/01/20/2868548.html



 浏览器 \ OSXP(IE6)XP(IE7)XP(IE8)Win7 x64(IE9)猎豹浏览器2.0急速模式    Chrome/21猎豹浏览器2.0兼容模式IE6  IE9淘宝浏览器2.0急速模式    Chrome/20淘宝浏览器2.0兼容模式IE6  IE7QQ浏览器7.0IE6  IE9360安全浏览器5.0IE6  IE7360安全浏览器5.0自带IE8内核版IE7 / IE8  IE7 360急速浏览器6.0急速模式    Chrome/21360急速浏览器6.0兼容模式IE6  IE9 / IE7 搜狗浏览器4.0高速模式    Chrome/17搜狗浏览器4.0兼容模式IE7  IE7 Firefox    Waterfox    Chrome 23    Chrome/23

看这张图……360让人大吃一斤……

php与js获得的user agent不一样……淘宝浏览器也有这毛病

测试代码:

复制代码
<!DOCTYPE html><html><head><meta charset="UTF-8" /><title>Welcome to nginx!</title></head><body><h2>php $_SERVER['HTTP_USER_AGENT']</h2><p><?phpecho $_SERVER['HTTP_USER_AGENT'];?></p><h2>js navigator.userAgent</h2><p><script>document.write(navigator.userAgent);</script><p><!--[if lte IE 6]><p>lte ie6</p><![endif]--><!--[if lte IE 7]><p>lte ie7</p><![endif]--><!--[if lte IE 8]><p>lte ie8</p><![endif]--><!--[if lte IE 9]><p>lte ie9</p><![endif]--></body></html>
复制代码

如何识别各个浏览器?

大部分浏览器 在 user agent 中都可以识别。

猎豹浏览器user agent 中有LBBROWSER,但没有版本号。用php无法获得,用js可以获得:

<script>alert(window.external.LiebaoGetVersion());</script>

360浏览器无法识别。以前可以用这个识别,但现在不行了:

if (window.external && window.external.twGetRunPath) {                    var r = external.twGetRunPath();    if (r && (r.toLowerCase().indexOf("360se") > -1 )) {        ret = true;    }}

参考360官方资料:http://app.browser.360.cn/ie6bye/

http://se.360.cn/common/qihoo_ie6_tips.js

 

如何提醒用户升级浏览器:

推荐升级到IE8或360:http://app.browser.360.cn/ie6bye/

推荐升级到IE9:http://godarkforie.org/

效果:

淘宝浏览器2.0 on Windows 7 x64:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.11 TaoBrowser/2.0 Safari/536.11

猎豹浏览器2.0.10.3198 急速模式on Windows 7 x64:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.71 Safari/537.1 LBBROWSER

猎豹浏览器2.0.10.3198 兼容模式on Windows 7 x64:

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; LBBROWSER) 

猎豹浏览器2.0.10.3198 兼容模式on Windows XP x86 IE6:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 732; .NET4.0C; .NET4.0E; LBBROWSER)" 

 

 

猎豹浏览器1.5.9.2888 急速模式on Windows 7 x64:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.84 Safari/535.11 LBBROWSER

猎豹浏览器1.5.9.2888 兼容模式 on Windows 7 x64:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) 

QQ浏览器7.0 on Windows 7 x64 IE9:

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; QQBrowser/7.0.3698.400) 

QQ浏览器7.0 on Windows XP x86 IE6:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 732; .NET4.0C; .NET4.0E) 

360安全浏览器5.0自带IE8内核版 on Windows XP x86 IE6:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SV1; QQDownload 732; .NET4.0C; .NET4.0E; 360SE) 

 

360安全浏览器5.0 on Windows XP x86 IE6:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 732; .NET4.0C; .NET4.0E) 

360安全浏览器5.0 on Windows 7 x64 IE9:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) 

360急速浏览器6.0 急速模式 on Windows XP x86:

Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1

360急速浏览器6.0 急速模式 on Windows 7 x64:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1

360急速浏览器6.0 兼容模式 on Windows XP x86 IE6:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 732; .NET4.0C; .NET4.0E) 

360急速浏览器6.0 兼容模式 on Windows 7 x64 IE9:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) 

360急速浏览器6.0 IE9/IE10模式 on Windows 7 x64 IE9:

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) 

搜狗浏览器4.0 高速模式 on Windows XP x86:

Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.84 Safari/535.11 SE 2.X MetaSr 1.0

搜狗浏览器4.0 兼容模式 on Windows XP x86 IE6:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SV1; QQDownload 732; .NET4.0C; .NET4.0E; SE 2.X MetaSr 1.0) 

 

Waterfox 16.0 on Windows 7 x64:

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:16.0) Gecko/20121026 Firefox/16.0

iPad:

Mozilla/5.0 (iPad; U; CPU OS 4_2_1 like Mac OS X; zh-cn) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5

Firefox x64 4.0b13pre on Windows 7 x64:

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0b13pre) Gecko/20110307 Firefox/4.0b13pre

Firefox x64 on Ubuntu 12.04.1 x64:

Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0

Firefox x86 3.6.15 on Windows 7 x64:

Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15

Chrome x64 on Ubuntu 12.04.1 x64:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11

Chrome x86 23.0.1271.64 on Windows 7 x64:

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11

Chrome x86 10.0.648.133 on Windows 7 x64:

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16

IE9 x64 9.0.8112.16421 on Windows 7 x64:

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)

IE9 x86 9.0.8112.16421 on Windows 7 x64:

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)

Firefox x64 3.6.10 on Ubuntu 10.10 x64:

Mozilla/5.0 (X11; U; Linux x86_64; zh-CN; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10

Andorid 2.2自带浏览器,不支持HTML5视频

Mozilla/5.0 (Linux; U; Android 2.2.1; zh-cn; HTC_Wildfire_A3333 Build/FRG83D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

 

0 0
原创粉丝点击