Jquery plug-in recommends browser sniffing userAgent_jquery

Source: Internet
Author: User
Here we recommend a jQuery plug-in useragent for browser sniffing, which is compatible with various browsers and is often used in projects. It is a very practical and comprehensive overview.

In version 1.7.x, jQuery removes support for browser sniffing. We recommend that you use feature detection. However, this function is also required in actual projects.

Compatibility

IE6 +, Chrome, Firefox, Safari, and Opera

Framework dependency

Native JS support

Module support

Supports AMD, node, and browsers

Introduction

1. recognition engine, for example:

// If the browser is the core of webkit, execute the following code
If (!! Client. engine. webkit ){
// Todo
}
2. Identify the browser, for example:

// If the IE browser is used and the IE version is 6, run the following code:
If (!! Client. browser. ie & client. browser. ie = 6 ){
// Todo
}
3. Operating System Identification and examples:

// For Windows 7, run the following code:
If (!! Client. system. win & client. system. win = 7 ){
// Todo
}
Download connection

Https://github.com/hehongwei44/userAgent

Authorization information

Authorization type: MIT

Authorization type: https://github.com/hehongwei44/userAgent/blob/master/LICENSE

Change log

Https://github.com/hehongwei44/userAgent/blob/master/ChangeLog.md

Other supplements

A good plug-in, recommended

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.