Javascript browser detection, javascript Browser

Source: Internet
Author: User

Javascript browser detection, javascript Browser

Browser kernel:

The core part of a browser is called the "Rendering Engine", also known as the "Rendering Engine", which is usually called the browser kernel.

The browser kernel determines how the browser displays the content and format of the webpage.

Kernel category:

1. Trident (IE kernel): IE 6/IE7/IE8 (Trident 4.0). IE9 (Trident 5.0). IE10 (Trident 10.0) is used in IE kernel browsers ). Of course, many browsers in China use the IE kernel, but they are not IE browsers (shell browsers ). For example: 360 security browser (1.0-5.0 using Trident), 6.0 using Trident + WebKit, 7.0 using Trident + Blink, Cheetah browser, ghost browser, and sogou high-speed browser.

Many browsers are now called "dual-core" or "multi-core". One of them uses Trident, and another kernel is added, which is called "high-speed browser mode" in China ". Trident is used for compatibility mode.

2. Gekco (Firefox kernel): Firefox browser.

3. Presto (an earlier version of Opera): It is now obsolete.

4. Webkit (Safari kernel, Chrome kernel): Apple's kernel is also Apple's Safari kernel, this kernel is used in Chrome, Safari, 360 and sogou browsers in high-speed mode.

5. Blink: it is a browser typographical engine developed by Google and Opera software. It is used after Chrome 28 and Opera 15.

Typographical engine:

1. Webcore: developed by Apple, the main web browser that uses Webcore is Safari.

2. KHTML.

Javascript to obtain client information:

Navigator contains information about the browser.

Object Attributes (list several common attributes ):

1. appVersion: return the platform and version information of the browser.

2. platform: return the name of the operating platform that runs the browser.

3. userAgent: return the user-agent header value sent by the client to the server.

Display of userAgent in various browsers:

Firefox: gecko uses the kernel, followed by version 20100101. You can also use firefox to determine whether the firefox browser is installed with version 35.0.


Opera: different versions may have different results:


IE9.0: You can use msie to determine whether the browser is an Internet Explorer.


Chrome:


Safari:


Imperfect browser support in China:

<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.