The jquery plug in recommends that browsers sniff the userAgent
- 2020-03-30 04:16:50
- OfStack
Comprehensive overview
compatibility
IE6+, Chrome, Firefox, Safari, Opera
Frame dependence
Used to introduce
1. Identify the engine and give the following examples:
// if the browser is webkit core, execute the following code
If (!!!!! Client. Engine. Its) {
/ / todo
}
2. Identify the browser and give the following examples:
// if it is Internet explorer and the version of Internet explorer is 6, Execute the following code
If (!!!!! Client. Browser. Ie == 6){
/ / todo
}
3. Identification of operating system and examples are as follows:
// if Windows 7, execute the following code
If (!!!!! Client. System. Win && client. System. Win == 7){
/ / todo
}
Download link
(link: https://github.com/hehongwei44/userAgent)
Authorization information
Authorization type: MIT
Authorization type information: (link: https://github.com/hehongwei44/userAgent/blob/master/LICENSE)
Change log
(link: https://github.com/hehongwei44/userAgent/blob/master/ChangeLog.md)
Other supplementary
A very good plug-in, worth recommending