User agents are used throughout client-server computing and application user agents that request web-based content are commonly browsers and search engine bots. Newsreaders, screen readers and other web-related applications and systems act as agents as well. In the case of a user requesting a web page with a browser, the browser transmits details about the user’s computer operating system as well as information about the browser itself. The user agent information is contained in the header portion of the request. The receiving server may choose to ignore the information in the user agent, or modify its response based on the information.
Web site developers frequently leverage information parsed from user agents to optimize the user experience based on the browser and device types. With the recent explosion of smartphones, many developers now check the device type and direct the user to a site optimized for mobile or use a mobile optimized style sheet. Some web sites check the browser version in the user agent to ensure the user has a current browser and directs them to various vendors’ web sites to download a newer version. Many enterprise applications check browser type and versions due mostly to heavy customization of the UI and to ensure an optimal experience. The user is typically denied access without the application’s “certified” browser or is notified the experience will be less than optimal.
When a user requests a web page or other resource, the request's header portion contains the user agent and other information (see sample header below).
The breakdown of the user agent in the header is as follows: