User agents can used for the following:
-They can be used to read your OS type, so if your OS is Mac it can go to a mac section of a site.
-Websites like Facebook use it all the time, it can read if you're on a mobile device and send you to m.facebook.com
-Web developers can disable a function on specific browsers, for example if something doesn't work on Netscape.
-Provide info if the user supports HTML frames, JS, 64-bit technologies, cookies, ...
Here is some other neat info your browser sends to us, without us requesting it!:
-IP Address: 38.107.191.81
-Hostname: 38.107.191.81
-Browser Name: Default Browser
-Browser Version:
Notice: Undefined index: parent in /home/onikun0/public_html/projects/useragent.php on line 42
-Windows?: False
-Operating System: unknown
-Javascript On?: False
-Sun© Java?: False
-AOL browser: False
Simple, right? Here are some things you should know:
-User Agents are purely what the client sends them, some security software may get rid of them (Such as firewalls/ Norton Internet Security)
-Did you know web spiders, such as Google's bot has its own user agent string? [Googlebot/2.1 (+http://www.googlebot.com/bot.html)]
-As all data sent by the client is their own, User agents can be modified/spoofed:
You can edit your own for testing with this Firefox extension: UA switcher
-Alongside those, the HTTP's referrer can be modified as well bypassing weak security, it should not be relied on except for simple things!
-These stats can be possible used to track your behaviour, and are usually logged, but in most cases shouldn't matter.