The user agent string userAgent can implement four identification functions: String useragent
Definition
User proxy string: navigator. userAgent
The HTTP specification clearly stipulates that the browser should send a brief user proxy string,
javascript is the primary language for front-end development, and we can write JavaScript programs to determine the type and version of the browser. JavaScript can determine browser types in general there are two ways, one is based on a variety of
This article mainly introduces the example of php useragent version detection. For more information, see
The code is as follows:
Define ('ie', 1 );
Define ('Firefox ', 2 );
Define ('chromi', 3 );
Define ('Opera ', 4 );
Class
This article mainly introduces the PHP detection useragent version of the example, the need for friends can refer to the following Code as follows: <?php define (' IE ', 1); Define (' FIREFOX ', 2); Define (' CHROME ', 3); Define (' OPERA ',
The previous article "Web development compatibility series (I): useragent values for browsers of different devices" lists the useragent values of common computer browsers and smart phone browsers.
Here, we analyze the features of the browser's
There are two methods for JavaScript to determine the browser type. One is to distinguish the browser type based on its unique attributes, the other method is to analyze the browser's userAgent attributes to determine that JavaScript is the main
Js identifies different browsers Based on userAgent for judgment, jsuseragent
Check the browser, pay attention to the browser judgment order, mainly based on userAgent for judgment.
// Check the browser var client = function () {var engine = {ie: 0,
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.