<p>What's the best / simplest / most accurate way to detect the browser of a user?</p>

<p>Ease of extendability and implementation is a plus.</p>

<p>The less technologies used, the better.</p>

<p>The solution can be server side, client side, or both. The results should eventually end up at the server, though.</p>

<p>The solution can be framework agnostic.</p>

<p>The solution will only be used for reporting purposes.</p>

The
JQuery Browser Plugin
will do it client-side for you.
What is the jQuery Browser Plugin?
The jQuery Browser Plugin is an addon for jQuery that makes it easy to uniquely identify your visitors' browsers.
What does it do?
It gives you an object in javascript that contains all of the information about the browser being used. It also adds CSS browser selectors, which means you can style elements or write functions for specific browsers, browser versions, layouts, layout versions, and even operating systems. Image of the jQuery Browser Plugin in action.
The plug-in makes
```
$.browser
```
available, which you can re-submit to your server via an AJAX call, if you really need it server-side.
```
```
alert($.browser.name);  // Alerts Firefox for me
```
```
The plug-in will only be as effective as the browsers it's been tested against, however. The plugin listed above has a list of
browsers recognised in it's tests
, but there's always the risk that a new browser will come sneaking out (
Google Chrome..
) that will require a re-write of the recognition rules. That said, this plug-in seems to be regularly updated.