This is my user agent
I know I am using chrome, so I understand it is from chrome version 26. But what is the rest of the information?
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko Recent IPv6 Addresses Visting Site: No IPv6 Address Visting Site Country OS on this IPv6. Detects and show a lot of information about your Browser and your installed plugins.
How can I read the string. And what all I can collect from userAgent?
What is the best way to parse the userAgent and read each property in it?
2 Answers
User Agent string provide information on application type, operating system, software vendor / version and layout rendering engine.
Depending on browser you would also get additional information. IE provides Feature Tokens that contains information about .NET runtime versions. You can learn more about IE specific tokens here - http://msdn.microsoft.com/en-us/library/ms537503(v=vs.85).aspx
Not sure if you would need this but will surely help to understand how user agent strings are decoded - http://www.texsoft.it/index.php?c=software&m=sw.php.useragent&l=it
From developer.mozilla.org:
Syntax
Directives
Examples
Firefox UA string:
Chrome UA string:
The Chrome (or Chromium/blink-based engines) user agent string is similar to the Firefox format. For compatibility, it adds strings like 'KHTML, like Gecko' and 'Safari'.