Hongmu Notes
Home Summary of pitfalls Browser User-Agent summary
Summary of pitfalls

Browser User-Agent summary

Browser User-Agent summary

1. Basic knowledge:

Http Header User-Agent


User Agent中文名为用户代理,是Http协议中的一部分,属于头域的组成部分,User Agent也简称UA。它是一个特殊字符串头,是一种向访问网站提供你所使用的浏览器类型及版本、操作系统及版本、浏览器内核、等信息的标识。通过这个标 识,用户所访问的网站可以显示不同的排版从而为用户提供更好的体验或者进行信息统计;例如用手机访问谷歌和电脑访问是不一样的,这些是谷歌根据访问者的 UA来判断的。UA可以进行伪装。

浏览器的UA字串的标准格式:浏览器标识 (操作系统标识; 加密等级标识; 浏览器语言) 渲染引擎标识版本信息。但各个浏览器有所不同。

String description:

1. Browser identification

For compatibility and promotion purposes, many browsers have the same logo, so the browser logo cannot indicate the real version of the browser. The real version information can be found at the end of the UA string.

2. Operating system identification

3. Encryption level identification

N: means no security encryption

I: indicates weak security encryption

U: stands for strong security encryption

4. Browser language

The language specified in Preferences > General > Language

5. Rendering engine

The mainstream rendering engines used by display browsers include: Gecko, WebKit, KHTML, Presto, Trident, Tasman, etc. The format is: rendering engine/version information

6. Version information

Display the real version information of the browser in the format: browser/version information

Browser User-Agent details

PC version:

safari 5.1 – MAC

User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50

safari 5.1 – Windows

User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50

IE 9.0

User-Agent:Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0;

IE 8.0

User-Agent:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)

IE 7.0

User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)

IE 6.0

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

Firefox 4.0.1 – MAC

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

Firefox 4.0.1 – Windows

User-Agent:Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

Opera 11.11 – MAC

User-Agent:Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.8.131 Version/11.11

Opera 11.11 – Windows

User-Agent:Opera/9.80 (Windows NT 6.1; U; en) Presto/2.8.131 Version/11.11

Chrome 17.0 – MAC

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11

Maxthon

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon 2.0)

Tencent TT

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; TencentTraveler 4.0)

The World 2.x

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)

The World 3.x

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; The World)

Sogou Browser 1.x

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SE 2.X MetaSr 1.0; SE 2.X MetaSr 1.0; .NET CLR 2.0.50727; SE 2.X MetaSr 1.0)

360 browser

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; 360SE)

Avant

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser)

Green Browser

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)

Mobile device side:

safari iOS 4.33 – iPhone

User-Agent:Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5

safari iOS 4.33 – iPod Touch

User-Agent:Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5

safari iOS 4.33 – iPad

User-Agent:Mozilla/5.0 (iPad; U; CPU OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5

Android N1

User-Agent: Mozilla/5.0 (Linux; U; Android 2.3.7; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

Android QQ Browser For android

User-Agent: MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

Android Opera Mobile

User-Agent: Opera/9.80 (Android 2.3.4; Linux; Opera Mobi/build-1107180945; U; en-GB) Presto/2.8.149 Version/11.10

Android Pad Moto Xoom

User-Agent: Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13

BlackBerry

User-Agent: Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.337 Mobile Safari/534.1+

WebOS HP Touchpad

User-Agent: Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.70 Safari/534.6 TouchPad/1.0

Nokia N97

User-Agent: Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/20.0.019; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.18124

Windows Phone Mango

User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; HTC; Titan)

UCNone

User-Agent: UCWEB7.0.2.37/28/999

UC standard

User-Agent: NOKIA5700/ UCWEB7.0.2.37/28/999

UCOpenwave

User-Agent: Openwave/ UCWEB7.0.2.37/28/999

UC Opera

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; ) Opera/UCWEB7.0.2.37/28/999

2. Browser identification

1. IE browser (taking IE 9.0 as an example)

PC: User-Agent:Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0;

Mobile devices: User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; HTC; Titan)

Since Aoyou, Window of the World, 360 Browser, Tencent Browser, Sogou Browser, Avant, and Green Browser all use the core of IE, the standard for IE browser judgment is the "MSIE" field. The number after the MSIE field is the version number, but it also needs to be judged not to contain fields such as "Maxthon", "The world", "360SE", "TencentTraveler", "SE", and "Avant" (Green Browser has no obvious logo). The mobile device also needs to determine the IEMobile+ version number.

2. 360 browser

PC side: User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; 360SE)

Mobile device: None

The judgment standard of 360 Browser is the "360SE" field, which has no version indication.

3. Sogou Browser

PC: User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SE 2.X MetaSr 1.0; SE 2.X MetaSr 1.0; .NET CLR 2.0.50727; SE 2.X MetaSr 1.0)

Mobile device: None

The judgment standard of Sogou Browser is the "SE" and "MetaSr" fields, and the version number is the number after SE.

4、Chrome

PC: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11

Mobile devices: User-Agent: 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

The judgment standard of the PC Chrome browser is the chrome field, and the number after chrome is the version number; the mobile Chrome browser judges fields such as "android", "linux", and "mobile safari", and the number after version is the version number.

5、Safari

PC: User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50

Mobile devices: User-Agent:Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5

Since Chrome and Nokia’s Series 60 browser also use the WebKit kernel, the Safari browser must determine that it includes the safari field and does not include chrome and other information. After confirmation, the number after "version/" is the version number. The one that contains the Mobile field under the above conditions is the Safari browser on the mobile device.

6. Tencent Browser

PC: User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; TencentTraveler 4.0; .NET CLR 2.0.50727)

Mobile devices: User-Agent: MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

The judgment standard for Tencent Browser is "TencentTraveler" or "QQBrowser". The number after TencentTraveler or QQBrowser is the version number.

7、Firefox

PC: User-Agent:Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

Mobile devices: User-Agent: Mozilla/5.0 (Androdi; Linux armv7l; rv:5.0) Gecko/ Firefox/5.0 fennec/5.0

The criterion for Firefox is the Firefox field, and the number after firefox is the version number.

8、The world

PC: User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; The World)

Mobile device: None

The judgment criterion of Theworld browser is the "The world" field, which does not indicate the version number.

It should be noted that there is no "The world" field in the User-Agent of The world 2.x version.

9. Travel

PC: User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon 2.0)

Mobile device: None

The judgment standard of Aoyou browser is "Maxthon", and the number after Maxthon is the version number.

10、Opera

PC: User-Agent:Opera/9.80 (Windows NT 6.1; U; en) Presto/2.8.131 Version/11.11

Mobile devices: User-Agent: Opera/9.80 (Android 2.3.4; Linux; Opera mobi/adr-1107051709; U; zh-cn) Presto/2.8.149 Version/11.10

The judgment criterion of opera browser is the opera field, and the number after the opera field is the version number.

11. UC Browser

UC Web has multiple browsing modes, and the corresponding User-Agent is:

UCNone

User-Agent: UCWEB7.0.2.37/28/999

UC standard

User-Agent: NOKIA5700/ UCWEB7.0.2.37/28/999

UCOpenwave

User-Agent: Openwave/ UCWEB7.0.2.37/28/999

UC Opera

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; ) Opera/UCWEB7.0.2.37/28/999

The judgment standard of UC Browser is the "UCWEB" field, and the number after UCWEB is the version number.

Operating system orientation

Operating system orientation relies on the User-Agent in the http header information transmitted by each browser when opening the page. For instructions on User-Agent, see User-Agent in Http header.

For detailed information about User-Agent, see Detailed information about browser User-Agent.

Let's learn about the identification methods of different operating systems in User-Agent.

 

微信赞赏

WeChat

支付宝赞赏

Alipay

✍️ Author: Hong Mu

webmaster · Thanks for reading, stay tuned for more exciting content

Author homepage View home page →

Related articles

Browser caching increases the speed of secondary visits to your website

Browser caching increases the speed of secondary visits to your website Summary of pitfalls

Use browser caching of official words: If users will visit your website multiple times, browser caching of static resources can save users time. Cache headers should be applied to all cacheable static resources, not just to a small subset of static resources (for example, images). Cacheable resources include JS and CSS files, image files, and other binary object files (media files, PDF files, etc.). Normally, HTML doesn’t…
👁 202

Recommended reading

Resource website typecho001 template

Resource website typecho001 template Program Notes Typecho

typecho001 template template please do not modify the folder name of this template. The folder name is: typecho001 1.4 Fix the js output problem on the article page 1.3 Fix the error prompt when the plug-in is not installed Optimize the list page code output 1.2 Fix the comment function and add a custom homepage title 1.1 Fix the comment reply asymmetry function Add a separate title setting function on the homepage Add the website favicon.ico icon Add one...
👁 198
Modification of typecho paging style

Modification of typecho paging style Program Notes Typecho

Sir, times have changed! Typecho is currently the most perfect solution, because Baidu can only see the code of fixed thinking. The actual generated HTML code is breathtakingly clean and fully customized, including adding classes to the li element, adding classes to the a element, adding classes to the previous page and next page, and removing the li tags that come with typecho to express more. I can even add some text to the content inside...
👁 517
Typecho article page comment style modification

Typecho article page comment style modification Program Notes Typecho

When you need to use typecho for template development, the default comment style is ugly. Therefore, comments need to be re-output or styled. The default comment template file path is: comments.php Mainly used related variables<?php $comments->gravatar('40', ''); ?> //Avatar has two parameters, size,...
👁 389
Typecho's API for adding, deleting, modifying and querying databases

Typecho's API for adding, deleting, modifying and querying databases Program Notes Typecho

Typecho database provides a very easy-to-use API, which is not much different from the native SQL writing method. At the same time, it also handles common SQL security issues, such as SQL injection. From a practical perspective, this article introduces common scenarios for typecho to operate databases and related API usage. Table creation and deletion During the development process of Typecho plug-in, you often need to create your own table. Typecho_… mentioned above
👁 552
PHP ob function record

PHP ob function record Language Notes PHP

Usage of the following three functions ob_get_contents(); ob_end_clean(); ob_start(); You can use these functions to buffer local files and execute local script code. Use ob_start() to save the output code into the buffer, and the page will not be displayed; then use ob_get_contents to get the data in the buffer. o…
👁 141
Summary of methods for calling popular comment articles and calling latest articles in Typecho

Summary of methods for calling popular comment articles and calling latest articles in Typecho Program Notes Typecho

Typecho articles call the Typecho program. When designing a theme, the sidebar sometimes needs to call popular articles or the latest articles. We can call it directly through the script at the specified location. In this article, we will organize this method of calling articles, which can be directly called and used in templates where needed in the future. In fact, designing a theme is just that. After the static template is completed, it is called directly. The latest article calls <?php $t…
👁 295