Meaning of User Agent
The Chinese name of the user agent is the user agent (UA), which is a special string header, the server can identify the operating system and version, CPU type, browser and version, browser rendering engine, browser language, and browser plug-in used by the customer.
Some websites often send different pages to different operating systems and browsers by judging the UA. Therefore, some pages may not be displayed normally in a browser, however, you can bypass detection by disguising UA.
UA string of the browser
Standard Format: browser ID (Operating System ID; encryption level ID; browser language) Rendering Engine ID version information
Browser ID
Because many websites ignore the two-digit version number during UA detection, the browser and later versions may receive bad pages, therefore, in Versions later than 10 of the browser, the browser identifier is fixed as the browser, and real version information is added at the end of the UA string.
Java usage:
1 useragent = useragent. parseuseragentstring (request. getheader ("User-Agent"); 2 browser = useragent. getbrowser (); 3 operatingsystem OS = useragent. getoperatingsystem ();
You can obtain browsers of almost all systems, including mobile phones and tablets. Document and: https://code.google.com/p/user-agent-utils/