注册表修改UserAgent说明文档
2012-09-20 TECH Compatible Platform regedit UserAgent Version
注册表存贮位置:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent]
参考文档: http://msdn.microsoft.com/en-us/library/ms537503.aspx
典型UserAgent:
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
字段 | 对应注册表 | 说明 |
---|---|---|
Mozilla/5.0 |
(默认) |
Mozilla版本, IE因为历史原因把自己也标记为Mozilla浏览器 |
compatible |
Compatible |
兼容模式标志 |
MSIE 9.0 |
Version |
浏览器版本号 |
Windows NT 6.1 |
Platform |
操作系统版本号 |
Trident/5.0 |
无 |
MSHTML版本号(可以用于检查是否支持HTML5) |
MSIE浏览器版本可用值:
浏览器版本 | 说明 |
---|---|
MSIE 10.0 | Internet Explorer 10 |
MSIE 9.0 | Internet Explorer 9 |
MSIE 8.0 | Internet Explorer 8 or IE8 Compatibility View/Browser Mode |
MSIE 7.0 | Windows Internet Explorer 7 or IE7 Compatibility View/Browser Mode |
MSIE 6.0 | Microsoft Internet Explorer 6 |
MS操作系统版本可用值:
操作系统版本 | 说明 |
---|---|
Windows NT 6.2 | Windows 8 |
Windows NT 6.1 | Windows 7 |
Windows NT 6.0 | Windows Vista |
Windows NT 5.2 | Windows Server 2003; Windows XP x64 Edition |
Windows NT 5.1 | Windows XP |
Windows NT 5.01 | Windows 2000, Service Pack 1 (SP1) |
Windows NT 5.0 | Windows 2000 |
Windows NT 4.0 | Microsoft Windows NT 4.0 |
Windows 98; Win 9x 4.90 | Windows Millennium Edition (Windows Me) |
Windows 98 | Windows 98 |
Windows 95 | Windows 95 |
Windows CE | Windows CE |
MSHTML版本可用值:
MSHTML版本 | 说明 |
---|---|
Trident/6.0 | Internet Explorer 10 |
Trident/5.0 | Internet Explorer 9 |
Trident/4.0 | Internet Explorer 8 |
如果要伪造MSIE为其他浏览器
只需要修改注册中 Version项 和 Platform项 即可
例如伪造Mac OSX下的Chrome:
(Default) Mozilla/5.0 Compatible compatible Version AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 Platform Macintosh; Intel Mac OS X 10_5_8
暂无评论