User agent |
A user agent is the client (computing) application used with a particular network protocol; the phrase is most commonly used in reference to those which access the World Wide Web. Web user agents range from web browsers to search engine web crawlers ( spiders ), as well as screen readers and braille browsers used by people with disabilities.
When Internet users visit a web site, a text can contact the operator of the bot.
The user-agent string is one of the criteria by which crawlers can be excluded from certain pages or parts of a website using the Robots Exclusion Standard ( robots.txt ). This allows webmasters who feel that certain parts of their website should not be included in the data gathered by a particular crawler, or that a particular crawler is using up too much bandwidth, to request that crawler not to visit those pages.
=User agent spoofing=
At various points in its history, use of the Web has been dominated by one browser to the extent that many websites are designed to work with that particular browser, rather than according to standards from bodies such as the W3C and IETF. Such sites often include browser sniffing code, which alters the information sent out depending on the User-Agent string received. This can 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 cloak or spoof this string, in order to identify themselves as something else to such detection code; often, the browser s real identity is then included later in the string.
The earliest example of this is Internet Explorer s use of a User-Agent string beginning Mozilla/ (compatible; MSIE ... , in order to receive content intended for Netscape Navigator, its main rival at the time of its development. It should be stressed that this is not a reference to the open-source Mozilla browser, which was developed much later, but to the original codename for Navigator, which was also the name of Mozilla (mascot). This format of User-Agent string has since been copied by other user agents, partly because Explorer, in turn, came to dominate.
When Internet Explorer became the dominant web browser, rivals such as Opera (web browser) and Safari (web browser) implemented systems whereby the user could select a false User-Agent string to send, such as that of a recent version of Explorer. Some – e.g. Safari – duplicate the User-Agent string they are trying to spoof exactly; others – e.g. Opera – duplicate the User-Agent string but add the genuine browser name to the end. This latter approach, of course, leads to a string containing three names and versions: first, the user agent claims to be Mozilla (i.e. Netscape Navigator); then, MSIE (Internet Explorer); and finally, the actual browser, such as Opera .
Beside browsers, other programs utilizing HTTP protocol, like most download managers and offline browsers, also had the ability to change the user agent string sent to servers to user s liking. This is presumably done in an effort to maintain compatibility with certain servers (some servers refused to serve those programs right away because they are mostly used carelessly, thus burdening the server).
This virtuous circle and vicious circle is expected to continue in the area of web browsers. Some standards-based web developers have started the Viewable With Any Browser campaign which encourages developers to design webpages according to official standards, not for any particular browser(s).
As of 2005, many websites are more standards-compliant than at other times in the history of the web. However, out-dated JavaScript, which effectively locks out browsers other than Explorer or Navigator, is still in use - especially on smaller, non-corporate, websites. This is often blamed on use of voodoo programming, in the form of copy and paste programming older code without actually understanding what effect this will have on the website.
One result of user agent spoofing is that the market share of web browsers such as Opera and Safari is severely undercounted, and the market share of more popular browsers such as Mozilla Firefox and Internet Explorer is exaggerated.
=Example user-agent strings=
==Browsers==
*Internet Explorer versions: **1.0 on Windows 95 — Microsoft Internet Explorer/4.0b1 (Windows 95) **1.5 on Windows NT — Mozilla/1.22 (compatible; MSIE 1.5; Windows NT) **2.0 on Windows 95 — Mozilla/1.22 (compatible; MSIE 2.0; Windows 95) **3.01 on Windows 98 — Mozilla/2.0 (compatible; MSIE 3.01; Windows 98) **5.0 on SunOS — Mozilla/4.0 (compatible; MSIE 5.0; SunOS 5.9 sun4u; X11) **5.2 on Mac OS X — Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC) **5.5 on Windows 2000 — Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) **6.0 in MSN on Windows 98 — Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98) **6.0 on Windows XP — Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) **6.0 on Windows XP with .Net framework installed — Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) **6.0 on Windows 2003 — Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322) **7.0 beta running on Windows XP — Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1) **7.0 beta running on Windows Vista — Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)
*Pocket Internet Explorer versions: **Microsoft Pocket Internet Explorer/0.6 **Mozilla/1.1 (compatible; MSPIE 2.0; Windows CE) **On Windows Mobile 2003 — Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)
*Avant Browser versions: **Ancient version — Advanced Browser (http://www.avantbrowser.com) **Old version — Avant Browser (http://www.avantbrowser.com) **More current — Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; iOpus-I-M; QXW03416; .NET CLR 1.1.4322)
*Konqueror versions: **3.1-RC1 — Mozilla/5.0 (compatible; Konqueror/3.1-rc3; i686 Linux; 20020515) **3.1 (French) — Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.22-10mdk; X11; i686; fr, fr_FR)
*Minimo: **0.007 on Windows Mobile 2003 — Mozilla/5.0 (Windows; U; Windows CE 4.21; rv:1.8b4) Gecko/20050720 Minimo/0.007
*Mozilla Application Suite 1.7.8 on Linux — Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511
*Mozilla Firefox versions: **1.0 (Dutch) on Windows XP — Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0 **1.0.4 on Ubuntu Linux Linux, on AMD64 — Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050512 Firefox **1.0.4 on FreeBSD 5.4 on i386 — Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050609 Firefox/1.0.4 **1.0.6 on Windows XP — Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 **1.0.6 on Mac OS X Mac OS X v10.4 PowerPC — Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-GB; rv:1.7.10) Gecko/20050717 Firefox/1.0.6 **1.0.7 on Windows XP — Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 **1.0.7 on Mac OS X Mac OS X v10.3 PowerPC — Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 **1.5b1 on Windows XP — Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4 **1.5b1 on Mac OS X Mac OS X v10.3 PowerPC — Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
*Mozilla SeaMonkey versions: **1.1a on Linux — Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051019 SeaMonkey/1.1a
*Netscape Navigator (proprietary) versions: **3.0 on SunOS with weak security — Mozilla/3.0 (X11; I; SunOS 5.4 sun4m) **4.61 on Apple Macintosh with weak security — Mozilla/4.61 (Macintosh; I; PPC) **4.61 on OS/2 with strong security — Mozilla/4.61 [en] (OS/2; U) **4.7 on Apple Macintosh — Mozilla/4.7C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; I; PPC) **4.8 on Windows 2000 — Mozilla/4.8 [en] (Windows NT 5.0; U)
*Netscape versions (based on non-proprietary shared Mozilla code base): **7 on Solaris Operating Environment — Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0 **7.1 on Windows XP — Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) **8.0.1 on Windows XP using Gecko — Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050519 Netscape/8.0.1 **8.0.1 on Windows XP using MSHTML (with Microsoft_.NET installed) — Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215) Netscape/8.0.1
*OmniWeb versions: **5.1.1 (v563.51) on Mac OS X — Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.51 **5.1.2 beta 1 (v563.57) on Mac OS X — Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.57
*Opera (web browser) versions: **6.03 on Windows 2000, cloaked as Internet Explorer — Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.03 [en] **7.23 on Windows 98 — Nokia9500/7.23 (Windows 98; U) [en] **8.00 on Windows XP — Opera/8.00 (Windows NT 5.1; U; en) **8.00 on Gentoo Linux Linux — Opera/8.0 (X11; Linux i686; U; cs) **8.02 on Windows XP — Opera/8.02 (Windows NT 5.1; U; en) **8.50 on Windows XP — Opera/8.50 (Windows NT 5.1; U; en) **8.50 on Windows XP, cloaked as Internet Explorer — Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.50 **8.50 on Windows XP, cloaked as Mozilla — Mozilla/5.0 (Windows NT 5.1; U; en) Opera 8.50 **9.00 Preview 1 on Windows 2000, cloaked as Opera — Opera/9.0 (Windows NT 5.0; U; en) *PlayStation Portable: **2.00 — Mozilla/4.0 (PSP (PlayStation Portable); 2.00)
*Safari (web browser) versions: **v125 on Mac OS X — Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125 **v125 on Mac OS X, cloaked as Internet Explorer — Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) **v312 on Mac OS X — Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/312.1 (KHTML, like Gecko) Safari/312 **2.0 (v412) on Mac OS X — Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/412 (KHTML, like Gecko) Safari/412
*ELinks 0.4pre5 on Linux — ELinks (0.4pre5; Linux 2.4.27 i686; 80x25) *Links (web browser) versions: **0.99pre14 under Cygwin on Windows 2000 — Links (0.99pre14; CYGWIN_NT-5.0 1.5.16(0.128/4/2) i686; 80x25) **2.1pre17 under Gentoo Linux Linux — Links (2.1pre17; Linux 2.6.11-gentoo-r8 i686; 80x24) *Lynx (web browser) 2.8.4rel.1 on Linux — Lynx/2.8.4rel.1 libwww-FM/2.14 *Off By One 3.5a on Windows XP — Mozilla/4.7 (compatible; OffByOne; Windows 2000) *W3m on FreeBSD — w3m/0.5.1
==Bots==
= Standard elements =
== Letter U / I ==
Netscape Navigator used these two letters to specify the browser s Encryption strength, because the US government wouldn t allow encryption higher than 40-bit to be exported from the USA. U stands for USA (for the version with 128-bit encryption) and I stands for International (the browser has 40-bit encryption and can be used anywhere in the world). Originally the U version was allowed for download only from the USA, but since then the US government has loosened its policy and exporting high encryption is now permitted (see Export of cryptography for more information). Now Netscape Communications Corporation and Mozilla Foundation distribute their browsers only in a U version, since an international version is no longer required.
== .NET CLR ==
This text is included in some Internet Explorer user agent strings to specify that the Microsoft .NET Framework has been installed on the computer. It can often be found in strings coming from Windows XP or Windows Server 2003.
=See also=
*Robots Exclusion Standard
=External links=
*[http://www.quirksmode.org/js/detect.html Detect your user agent string] *[http://www.pgts.com.au/pgtsj/pgtsj0208c.html List of user agent strings] *[http://www.chrispederick.com/work/firefox/useragentswitcher/ User Agent Switcher for Firefox and Mozilla (GNU GPL license)]|
|