Chrome and Safrai use WebKit as the kernel engine, so if
JQuery.browser.webkit is true to indicate that the browser is Chrome or safari;
If JQuery.browser.mozilla is true, it means that the browser is Mozillafirefox (Firefox);
Jquery.browser by parsing the navigator.useragent to get the browser type and version number, this technique is also known as browser sniffing technology.
Navigator is a property of the Global Object window, pointing to a navigator object that contains information about the browser being used;
Navigator.useragent contains the value of the user agent (user-agent) that the browser uses for HTTP, the request.
Avoid writing code that is based on a particular type or version number, because it can cause code to be closely linked to a particular browser type or version, and the browser's navigatoe.useragent is modifiable;
the best way to solve the browser is to test the code based on browser functionality.
The resolution for Navigator.useragent is implemented by Method Jquery.uamatch (UA).
This code is used to parse the user agent Navigator.useragent 4 regular expressions;
Each regular consists of two groups: Browser type feature characters and browser version feature characters.
Assigns a value to useragent.
858~868: Defines the method Jquery.uamatch (UA) that resolves the current browser's type and version number. In this method, try to match the user agent navigator.useragent with 4 regular expressions, and return the value of the result in the following format.
{
Browser: "",
Version: ""
}
899~903: Call Jquery.uamatch (UA) To resolve user agent nabigator.userabent. Do not reseal the parsing results to Jquery.browser.