User-Agent?
When a web browser does access a webserver, it generally does transmit a "User-Agent" string. This string is supposed to give the webserver informations on who is requesting a specific ressource. This might include, but is not restricted to, the name and versions of the browser and the underlying Operating System. As nothing specify what these strings should look like, it is a big mess. Hence this page.
Ok... What's the big deal?
While I was doing some analysis on my logs, I noticed a couple of weird user-agent strings. I know that anyone can spoof its user-agent trivially, but I believe it is still somewhat representative. That's when I tried to get some useful statistics out of it that I realized that getting the OS name or the Browser name out of it was trickier than I thought.
These pages regroup my thoughts on the matter and the code I wrote to get OS and Browser from a User-Agent string.
These pages regroup my thoughts on the matter and the code I wrote to get OS and Browser from a User-Agent string.
Table of contents
| Introduction | "Introduction", "Foreword", "General info", "What the hell is this?", you really might want to call this however you want. |
| Code | This is the piece of code that I used to detect browser, OS and versions. |
| Results | This page represent all the user-agents encountered, as well as the detection (OS and Browser) with my code. |
| Statistics | With this information, I made some statistics from my logs. The page will soon be dynamic, ie: automatically generated from the logs, hence reflecting the real statistics for people accessing my website. |
| Forum | Any feedback is more than welcome. Suggestions, errata, comments, anything. |
Ressources
I got some help from some websites out there. Here they are, with many thanks.
| Tesremas: Registered Web Browsers | Lists a bunch of User-Agent strings and their OS, Browser and other infos. It looks like if anyone can add to this list, so I'm not sure about the reliability of it... |
| Browser ID Strings (a.k.a. User Agent ID) | Lists all (most) known browsers and some typical user-agents. The list is nicely done, and up to date (as of Feb 2004). A great resource, though not exhaustive! |