Is there a user agent database for browser brand mappings?

In my application, I would like to keep the last browser used so as not to spend a lot of time on the phone with users trying to figure out if they are using IE7 or IE8. Storing a user agent string will probably be fine for me, however, if possible, I would like to save and show only the brand name and version, that is, something readable for "normal" people like "Mozilla Firefox 3.6".

So my question is: is there some kind of database that collects user agent strings and matches them with trademarks and provides the data as something I could use in development? If not, do you know of any mature software that parses the user agent string and returns the brand name?

+5
source share
1 answer

The brand name and version can be easily removed from the user agent string using a regular expression or a simple string search.

. , "MSIE" "Internet Explorer" - .

(MSIE|Firefox|Chrome)(\s|\/)(\d{1,3}\.\d)

, this, " " FireFox . , /.

+4

All Articles