JavaScript Advanced Programming Learning Note nineth-client-side detection

Source: Internet
Author: User

1. Capability Detection: The goal of competency detection is not to identify a particular browser, but to identify the browser's capabilities. (My understanding is to identify what the browser can do and what not to do)

2. Quirks Detection: The goal is to identify the specific behavior of the browser. But unlike ability detection to confirm what the browser supports, quirks detection is to know what bugs the browser has ("quirks" are bugs).

3. User Agent Detection: One of the most controversial client detection techniques. User agent detection determines the actual browser used by detecting the user agent string. During each HTTP request, the user-agent string is sent as a response header, and the string can be accessed through the JavaScript's Navigator.useragent property. On the server side, it is a common and widely accepted practice to determine which browser a user is using by detecting the user-agent string. On the client side, user agent detection is generally used as a last resort, with priority being given after capability detection and/or quirks detection.

Spoofing: means that a browser can spoof a server by adding some false or misleading information to its own user-agent string.

The HTTP specification (including versions 1.0 and 1.1) explicitly states that the browser should send a short user-agent string indicating the browser's name and version number. The user agent string should be given as a set of products in the form of: identifier/product version number. However, the real user-agent string is never so simple.


JavaScript Advanced Programming Learning Note nineth-client-side detection

Related Article

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.