title: Is there a good method for parsing the user-agent string?
body: <p>I have a <code>Java</code> module that receives the <code>User-Agent</code> string from an end user's browser needs to behave slightly differently depending on the type of browser, the version of the browser and maybe even the operating system.
  E.g.: <code>{"FireFox", "7.0", "Win7"}</code>, <code>{"Safari", "3.2", "iOS9"}</code></p>
  
  <p>I understood that the <code>User-Agent</code> string can vary in its format for the exact same configuration due to different plug-in installations etc.</p>
  
  <p>My questions:  </p>
  
  <ol>
  <li>Is the structure of the <code>User-Agent</code> well defined? If yes - where can I find it exactly? (From my understanding of the RFC there is not much standardization here).</li>
  <li>Assuming the question for #1 is <code>No</code> - is there a proper way to parse it to get the info I need? </li>
  <li>Is there a better way to get the info I need other than the <code>User-Agent</code> string?</li>
  </ol>
  
  <p>Important note - I'm talking about a web-app, so my data collection abilities are limited to <code>javascript</code>.</p>