HOME

TheInfoList



OR:

In computing, a user agent is any software, acting on behalf of a user, which "retrieves, renders and facilitates end-user interaction with Web content". A user agent is therefore a special kind of
software agent In computer science, a software agent or software AI is a computer program that acts for a user or other program in a relationship of agency, which derives from the Latin ''agere'' (to do): an agreement to act on one's behalf. Such "action on behal ...
. Some prominent examples of user agents are
web browsers A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
and email readers. Often, a user agent acts as the
client Client(s) or The Client may refer to: * Client (business) * Client (computing), hardware or software that accesses a remote service on another computer * Customer or client, a recipient of goods or services in return for monetary or other valuable ...
in a client–server system. In some contexts, such as within the
Session Initiation Protocol The Session Initiation Protocol (SIP) is a signaling protocol used for initiating, maintaining, and terminating communication sessions that include voice, video and messaging applications. SIP is used in Internet telephony, in private IP telepho ...
(SIP), the term ''user agent'' refers to both end points of a communications session.


User agent identification

When a software agent operates in a network protocol, it often identifies itself, its application type,
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
, device model, software vendor, or software revision, by submitting a characteristic identification
string String or strings may refer to: * String (structure), a long flexible structure made from threads twisted together, which is used to tie, bind, or hang other objects Arts, entertainment, and media Films * ''Strings'' (1991 film), a Canadian ani ...
to its operating peer. In HTTP, SIP,RFC 3261, ''SIP: Session Initiation Protocol'', IETF, The Internet Society (2002) and NNTP protocols, this identification is transmitted in a header field ''User-Agent''. Bots, such as Web crawlers, often also include a
URL A Uniform Resource Locator (URL), colloquially termed as a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identifi ...
and/or
e-mail address An email address identifies an email box to which messages are delivered. While early messaging systems used a variety of formats for addressing, today, email addresses follow a set of specific rules originally standardized by the Internet Engineer ...
so that the
Webmaster A webmaster is a person responsible for maintaining one or more websites. The title may refer to web architects, web developers, site authors, website administrators, website owners, website coordinators, or website publishers. The duties of ...
can contact the operator of the bot.


Use in HTTP

In HTTP, the User-Agent string is often used for
content negotiation Content negotiation refers to mechanisms defined as a part of HTTP that make it possible to serve different versions of a document (or more generally, representations of a resource) at the same URI, so that user agents can specify which version fi ...
, where the origin server selects suitable content or operating parameters for the response. For example, the User-Agent string might be used by a web server to choose variants based on the known capabilities of a particular version of client software. The concept of content tailoring is built into the HTTP standard i
RFC 1945
"for the sake of tailoring responses to avoid particular user agent limitations". The User-Agent string is one of the criteria by which Web crawlers may be excluded from accessing certain parts of a website using the
Robots Exclusion Standard The robots exclusion standard, also known as the robots exclusion protocol or simply robots.txt, is a standard used by websites to indicate to visiting web crawlers and other web robots which portions of the site they are allowed to visit. Th ...
(''robots.txt'' file). As with many other HTTP request headers, the information in the "User-Agent" string contributes to the information that the client sends to the server, since the string can vary considerably from user to user.


Format for human-operated web browsers

The User-Agent string format is currently specified by section 10.1.5 o
HTTP Semantics
The format of the User-Agent string in HTTP is a list of product tokens (keywords) with optional comments. For example, if a user's product were called WikiBrowser, their user agent string might be ''WikiBrowser/1.0 Gecko/1.0''. The "most important" product component is listed first. The parts of this string are as follows: * product name and version (''WikiBrowser/1.0'') * layout engine and version (''Gecko/1.0'') During the first
browser war Browse, browser or browsing may refer to: Programs *Web browser, a program used to access the World Wide Web *Code browser, a program for navigating source code *File browser or file manager, a program used to manage files and related objects *Ha ...
, many web servers were configured to send web pages that required advanced features, including frames, to clients that were identified as some version of
Mozilla Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape. The Mozilla community uses, develops, spreads and supports Mozilla products, thereby promoting exclusively free software and open standards, wi ...
only. Other browsers were considered to be older products such as Mosaic,
Cello The cello ( ; plural ''celli'' or ''cellos'') or violoncello ( ; ) is a bowed (sometimes plucked and occasionally hit) string instrument of the violin family. Its four strings are usually tuned in perfect fifths: from low to high, C2, G2, ...
, or
Samba Samba (), also known as samba urbano carioca (''urban Carioca samba'') or simply samba carioca (''Carioca samba''), is a Brazilian music genre that originated in the Afro-Brazilian communities of Rio de Janeiro in the early 20th century. Havi ...
, and would be sent a bare bones HTML document. For this reason, most Web browsers use a User-Agent string value as follows: For example, Safari on the iPad has used the following: Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405 The components of this string are as follows: * ''Mozilla/5.0'': Previously used to indicate compatibility with the Mozilla rendering engine. * ''(iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)'': Details of the system in which the browser is running. * ''AppleWebKit/531.21.10'': The platform the browser uses. * ''(KHTML, like Gecko)'': Browser platform details. * ''Mobile/7B405'': This is used by the browser to indicate specific enhancements that are available directly in the browser or through third parties. An example of this is Microsoft Live Meeting which registers an extension so that the Live Meeting service knows if the software is already installed, which means it can provide a streamlined experience to joining meetings. Before migrating to the
Chromium Chromium is a chemical element with the symbol Cr and atomic number 24. It is the first element in group 6. It is a steely-grey, lustrous, hard, and brittle transition metal. Chromium metal is valued for its high corrosion resistance and hardne ...
code base,
Opera Opera is a form of theatre in which music is a fundamental component and dramatic roles are taken by singers. Such a "work" (the literal translation of the Italian word "opera") is typically a collaboration between a composer and a libre ...
was the most widely used web browser that did not have the User-Agent string with "Mozilla" (instead beginning it with "Opera"). Since July 15, 2013, Opera's User-Agent string begins with "Mozilla/5.0" and, to avoid encountering legacy server rules, no longer includes the word "Opera" (instead using the string "OPR" to denote the Opera version).


Format for automated agents (bots)

Automated web crawling tools can use a simplified form, where an important field is contact information in case of problems. By convention the word "bot" is included in the name of the agent. For example: Googlebot/2.1 (+http://www.google.com/bot.html) Automated agents are expected to follow rules in a special file called " robots.txt".


User agent spoofing

The popularity of various Web browser products has varied throughout the Web's history, and this has influenced the design of websites in such a way that websites are sometimes designed to work well only with particular browsers, rather than according to uniform standards by the
World Wide Web Consortium The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
(W3C) or the
Internet Engineering Task Force The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and a ...
(IETF). Websites often include code to detect browser version to adjust the page design sent according to the user agent string received. This may mean that less-popular browsers are not sent complex content (even though they might be able to deal with it correctly) or, in extreme cases, refused all content. Thus, various browsers have a feature to ''cloak'' or ''spoof'' their identification to force certain server-side content. For example, the Android browser identifies itself as
Safari A safari (; ) is an overland journey to observe wild animals, especially in eastern or southern Africa. The so-called "Big Five" game animals of Africa – lion, leopard, rhinoceros, elephant, and Cape buffalo – particularly form an impor ...
(among other things) in order to aid compatibility. Other HTTP client programs, like
download manager A download manager is a software tool that manages the downloading of files from the Internet, which may be built: into a Web browser A web browser is application software for accessing websites. When a user requests a web page from a pa ...
s and offline browsers, often have the ability to change the user agent string. A result of user agent spoofing may be that collected statistics of Web browser usage are inaccurate.


User agent sniffing

''User agent sniffing'' is the practice of websites showing different or adjusted content when viewed with certain user agents. An example of this is
Microsoft Exchange Server Microsoft Exchange Server is a mail server and calendaring server developed by Microsoft. It runs exclusively on Windows Server operating systems. The first version was called Exchange Server 4.0, to position it as the successor to the related ...
2003's Outlook Web Access feature. When viewed with Internet Explorer 6 or newer, more functionality is displayed compared to the same page in any other browsers. User agent sniffing is considered poor practice, since it encourages browser-specific design and penalizes new browsers with unrecognized user agent identifications. Instead, the W3C recommends creating standard HTML markup, allowing correct rendering in as many browsers as possible, and to test for specific browser features rather than particular browser versions or brands. Websites intended for display by mobile phones often rely on user agent sniffing, since
mobile browser A mobile browser is a web browser designed for use on a mobile device such as a mobile phone or PDA. Mobile browsers are optimized to display Web content most effectively on small screens on portable devices. Mobile browser software must be sma ...
s often differ greatly from each other.


Encryption strength notations

Web browsers created in the United States, such as
Netscape Navigator Netscape Navigator was a web browser, and the original browser of the Netscape line, from versions 1 to 4.08, and 9.x. It was the flagship product of the Netscape Communications Corp and was the dominant web browser in terms of usage share in ...
and
Internet Explorer Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated IE or MSIE) is a series of graphical user interface, graphical web browsers developed by Microsoft which was used in the Microsoft Wind ...
, previously used the letters U, I, and N to specify the
encryption In cryptography, encryption is the process of encoding information. This process converts the original representation of the information, known as plaintext, into an alternative form known as ciphertext. Ideally, only authorized parties can dec ...
strength in the user agent string. Until 1996, when the United States government allowed encryption with keys longer than 40 bits to be exported, vendors shipped various browser versions with different encryption strengths. "U" stands for "USA" (for the version with 128-bit encryption), "I" stands for "International" the browser has 40-bit encryption and can be used anywhere in the world and "N" stands (''de facto'') for "None" (no encryption). Following the lifting of
export restrictions Export restrictions, or a restriction on exportation, are limitations on the quantity of goods exported to a specific country or countries by a Government. Export restrictions could be aimed at achieving diverse policy objectives such as environ ...
, most vendors supported 256-bit encryption.


Deprecation of User-Agent header

In 2020,
Google Google LLC () is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics. I ...
announced that they would be phasing out support for the User-Agent header in their
Google Chrome Google Chrome is a cross-platform web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS, ...
browser. They stated that other major web browser vendors were supportive of the move, but that they did not know when other vendors would follow suit. Google stated that a new feature called Client Hints would replace the functionality of the User-Agent string.


See also

*
Robots exclusion standard The robots exclusion standard, also known as the robots exclusion protocol or simply robots.txt, is a standard used by websites to indicate to visiting web crawlers and other web robots which portions of the site they are allowed to visit. Th ...
*
Web crawler A Web crawler, sometimes called a spider or spiderbot and often shortened to crawler, is an Internet bot that systematically browses the World Wide Web and that is typically operated by search engines for the purpose of Web indexing (''web spid ...
* Wireless Universal Resource File (WURFL) * User Agent Profile (UAProf) * Browser sniffing *
Web browser engine A browser engine (also known as a layout engine or rendering engine) is a core software component of every major web browser. The primary job of a browser engine is to transform HTML documents and other resources of a web page into an interactiv ...


References

{{DEFAULTSORT:User Agent Clients (computing) Hypertext Transfer Protocol headers