Can we create a thorough question/answers post with the core methods that allow browser detection in Joomla 2.5 and 3 ? After a quick research in the web, I feel that there is not sufficient information on a single page the fulfills the topic.
A more thorough walk through should really be added to the docs wiki IMO, but sharing what I can via mobile now.
For 2.5 and 3.x compatibility, you can use JBrowser to do some browser detection. However, this class may not work well with newer browsers or versions. To use it to get the browser:
For 3.2 and newer, you can use JApplicationWebClient, which is a newer class designed to be more flexible with today's browser options. To use it to get the browser:
Both classes are documented on the API site, http://api.joomla.org/cms-3/index.html will link you to the base page for 3.3 docs.
In addition to Michael's answer, the JApplicationWebClient Class has a few other useful properties: