User agent
A User Agent ( english user "user" agent "mediator, representative, agent") is a client-side application to use a network service . The user agent forms the interface to the user , displays the content of the service and receives commands from the user. Examples of user agents are web browsers , e-mail programs , news readers or IRC clients . Many user agents transmit their names and other data in the header of a request to a server as a character string ( user agent string ). The name of the corresponding header in the Hypertext Transfer Protocol (HTTP) is User-Agent .
Web browser
Web browsers use HTTP, standardized in standard RFC 2616 , to access websites . The standard provides a header called " User-Agent " for transmitting the name and version of the browser software to the web server . The header is optional but recommended and is used by most web browsers and other client software ( e.g. web crawlers ). It is transmitted with every single page request.
The standard specifies the intended use of the header:
- Statistical surveys
- Troubleshooting
- Delivery of content that is tailor-made for specific client software.
Structure of the HTTP user agent string
The user agent string in HTTP contains the name, version and comment on one or more components of the client. These each have the following structure:
Name/Version (Kommentar)
The comment is optional, its content is not standardized any further. Many browser programs incorporate more or less human-readable information about the operating system and even the hardware platform on which they run. Others forego it entirely.
For example, the following header is from the Lynx text mode browser :
Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c
The names and versions of the browser itself and several libraries are given here. Comments are missing.
In contrast, this user agent string is from Opera 9.63:
Opera/9.63 (Macintosh; Intel Mac OS X; U; en) Presto/2.1.1
Here you can read from the comment that the browser runs on an Apple Macintosh with an Intel processor, as well as some other information. The letter "U" means that the cryptographic algorithms available in the browser are not restricted by American export bans , the part "en" indicates that the browser is in the English language version. In addition, the version number of the Presto rendering engine is given.
Mozilla standard
When the Netscape Navigator was introduced in 1994, it had the name “Mozilla” in the “user agent string”, which was the internal code name of the project. For example, the header looked like this:
Mozilla/1.0N (Windows)
This was before the standardization of HTTP, and with it the header format, so that browsers at that time often deviate from the format that is valid today. For example, Netscape Navigator 4.x delivers the application language after the version number in square brackets, for example:
Mozilla/4.06 [es] (Win98; I)
In the first few years after the Navigator was introduced, Netscape added many new technologies to its website design capabilities in rapid succession. In particular, version 2.0 from spring 1996 brought JavaScript (under the name LiveScript), plug-ins , animated GIF images and various new text markups. Anyone who wanted to use these options to design their websites was initially practically dependent on their visitors using the Netscape Navigator. That is why many sites installed a so-called browser switch that reads the “user agent header” and provides users of other browsers with alternatively designed pages or at least a meaningful error message.
Over time, as other browsers also supported newer features introduced by Netscape, the browser switches were often not updated; the users of these products would then not have received this content even though they could interpret it. For this reason, it became common for them to pass themselves off as the Mozilla version in the “user agent header” and only mention the actual name and version of the software in the comment field. For example, the "user agent header" of Microsoft Internet Explorer 2.0 (published in November 1995) is:
Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)
This convention is still largely adhered to today and most browsers still identify with Mozilla . For example, the "header" of Apple Safari under iOS 5.0 on the iPhone 4s , published in October 2011, reads as follows.
Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3
The importance of the “user agent header” in the test has declined because there are now very numerous browser versions and better options are available for targeted testing of individual skills with the help of JavaScript.
Most browsers also allow the user to change the “user agent header”, usually in the developer tools provided, but more or less hidden .
Cellphone
In contrast to PC web browsers, browsers on mobile phones transmit additional information in the user agent , such as the firmware version of the device, browser type and version, or support for Java (J2ME). Later, it was decided to outsource additional information to the UAProf ( User Agent Profile ).
Examples:
BlackBerry8520/5.0.0.681 Profile/MIDP-2.1 Configuration/CLDC-1.1 VendorID/114
Mozilla/5.0 (Linux; U; Android 2.2; de-de; HTC Magic Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
SonyEricssonT68/R201A
Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 920) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537
search engines
A web crawler , i.e. the unit of a search engine that searches the network , basically looks like a normal browser to a web server, but usually sends a distinctive user agent string to inform the operator. This distinctive user agent is sometimes used by web server operators to send specially prepared information to search engines. This sending of information specially prepared for search engines is called cloaking .
Email and Usenet News
When using e-mail , the user agent is the software that downloads messages from a mail server and displays them to the user, as well as enables him to compose new messages and in turn transmits them to a mail server. It can be an application program that runs locally on the user's computer, or a webmail service such as GMX or Gmail . The expression Mail User Agent and especially the abbreviation MUA are quite common in technical discussions, especially for local application programs. The same applies to the exchange of messages on Usenet , where the user agent is usually referred to as a newsreader .
When sending e-mails or messages on Usenet, the user agent constructs a message package that is sent to the recipient (s). The format of these messages is currently (as of 2013) standardized in RFC 5322 . In addition to the actual text, the messages also contain technical information in header lines; the standard does not provide for a header to note the user agent who sent the message.
However, it is permissible for user agents to include their own headers in the message, which are not specified by the standard. Many programs use this to fill in their name and version. The consequence of this is that the recipient of the message can recognize the software with which the sender sent the e-mail. In the absence of standardization, various header names are common for this. The purely informative (non-normative) RFC 2076 published in 1999 , which gives an overview of the headers common at the time, gives the following names for specifying the client software and its version:
- version
- Mailer
- Originating client
- X mailer
- X newsreader
In practice, “X-Mailer”, “X-Newsreader” and “User-Agent” are the most common, the latter perhaps based on the HTTP standard. The prefix “X-” is intended to indicate “experimental” headers, but the meaning of this is inconsistent in practice. The content of the header is of course not standardized and a uniform structure cannot be recognized. Even if the header name "User-Agent" is used, the programs do not adhere to the structure provided for in HTTP.
The content of these headers can be used for statistical surveys and for troubleshooting, although the inconsistent use is likely to reduce the statistical value. Functional use would theoretically be possible (for example, known formatting errors in software could be automatically corrected if this software is identified by its header), but is not known in practice.
Examples of e-mail programs:
User-Agent: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0)
User-Agent: Mutt/1.5.13 (2006-08-11)
X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i386-pc-linux-gnu)
Examples of news readers:
User-Agent: 40tude_Dialog/2.0.8.1de
User-Agent: tin/1.7.2-20031104 ("Eriskay") (UNIX) (Linux/2.4.18-1-686 (i686))
X-Newsreader: Forte Agent 1.8/32.553
It can be seen that it partially contains information about the operating system and hardware platform.
Web links
- Determination of the user agent of your own browser via a program on a server of the Wikimedia project
Individual evidence
- ↑ get_browser - Get the capabilities of a user's browser ; PHP manual; Description of the get_browser function of the PHP programming language to determine the capabilities of the requesting browser to set up a server-side browser switch
- ↑ User Agent Strings - Google Chrome. Retrieved January 14, 2019 .
- ↑ Firefox user agent string reference. Retrieved January 14, 2019 (American English).
- ↑ heise online: Against fingerprinting: Apple freezes Safari's user agent. Retrieved January 14, 2019 .