Forum Moderators: open

Message Too Old, No Replies

Comprehensive list of HTTP_USER_AGENT values?

Trying to find comprehensive list of valid browser ids

         

nizo

9:39 pm on Aug 18, 2004 (gmt 0)



Does anyone have a "comprehensive" list of browsers and the information they send as an HTTP_USER_AGENT value? At the very least I would like to get a list of the more popular ones (IE/Netscape/Mozilla/Firefox/Safari/etc). Anyone who is willing to share this info from access logs would make me a happy camper too :-) The following gets the info from my logs (with access_log as the prefix, none of them are compressed) on a linux machine running Apache 2.* so your mileage may vary: cat access_log* ¦ awk -F\" '{print($6)}' ¦ sort ¦ uniq

dcrombie

7:54 am on Aug 19, 2004 (gmt 0)



Running that command on one of our servers for one day gives >1200 user agents (mostly due to browser extensions). You'll also find that new ones appear on a daily basis which makes a comprehensive list impossible.

There are plenty of sites that tried this and have a database online - just none of them are comprehensive ;)

Krapulator

12:19 pm on Aug 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This bloke [garykeith.com] keeps an up to date, very accurate list of user agents. I have been regularly updating my server with his updates for the last two years and they have always worked well.

encyclo

1:41 pm on Aug 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com], nizo!

From Krapulator's site:

28,592 user agents in my database

Do you really need them all, or are you looking at parsing for the most common user agents only? A lot of the user agent strings are very similar, and are for the same browsers.

Here's a list of the most common browsers' basic user agent strings (ie. without extra bits on the end):

Internet Explorer (Windows)

IE6 (on WinXP):
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

IE5.5 (on W2K):
Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

IE5.01 (on Win98):
Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)

Mozilla variants

Mozilla 1.7 (on W2K):
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040608

Firefox 0.9.3 (on Linux):
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3

Netscape 7.1 (on WinXP):
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

Konqueror

KDE Konqueror (on Linux with a 2.6.7 kernel):
Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.7-3ajp; X11; i686) (KHTML, like Gecko)

Opera

Opera 7.54 (on WinXP):
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [en]
Opera/7.54 (Windows NT 5.1; U) [en]

(first example is spoofed as IE6, second without spoofing)

Mac browsers

Safari (on OSX):
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9

IE 5.23 (on MacOS):
Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)

Netscape 4.79 (on MacOS):
Mozilla/4.79 (Macintosh; U; PPC)

Bots

Googlebot:
Googlebot/2.1 (+http://www.google.com/bot.html)

MSN:
msnbot/0.11 (+http://search.msn.com/msnbot.htm)

Yahoo:
Mozilla/5.0 (compatible; Yahoo! Slurp; [help.yahoo.com...]