Keep in mind that the user agent string of a browser can easily be forged; in other words, I can easily be using a robot or Firefox, but have the user agent claim I am using Internet Explorer.
If you must be as certain as possible about the abilities of a user's browser, I recommend BrowserHawk. It's expensive but harder to fool.