History of the browser user-agent string

September 3, 2008

In the beginning there was NCSA Mosaic, and Mosaic called itself NCSA_Mosaic/2.0 (Windows 3.1), and Mosaic displayed pictures along with text, and there was much rejoicing.

And behold, then came a new web browser known as “Mozilla”, being short for “Mosaic Killer,” but Mosaic was not amused, so the public name was changed to Netscape, and Netscape called itself Mozilla/1.0 (Win3.1), and there was more rejoicing. And Netscape supported frames, and frames became popular among the people, but Mosaic did not support frames, and so came “user agent sniffing” and to “Mozilla” webmasters sent frames, but to other browsers they sent not frames.

And Netscape said, let us make fun of Microsoft and refer to Windows as “poorly debugged device drivers,” and Microsoft was angry. And so Microsoft made their own web browser, which they called Internet Explorer, hoping for it to be a “Netscape Killer”. And Internet Explorer supported frames, and yet was not Mozilla, and so was not given frames. And Microsoft grew impatient, and did not wish to wait for webmasters to learn of IE and begin to send it frames, and so Internet Explorer declared that it was “Mozilla compatible” and began to impersonate Netscape, and called itself Mozilla/1.22 (compatible; MSIE 2.0; Windows 95), and Internet Explorer received frames, and all of Microsoft was happy, but webmasters were confused.

And Microsoft sold IE with Windows, and made it better than Netscape, and the first browser war raged upon the face of the land. And behold, Netscape was killed, and there was much rejoicing at Microsoft. But Netscape was reborn as Mozilla, and Mozilla built Gecko, and called itself Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826, and Gecko was the rendering engine, and Gecko was good. And Mozilla became Firefox, and called itself Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.5) Gecko/20041108 Firefox/1.0, and Firefox was very good. And Gecko began to multiply, and other browsers were born that used its code, and they called themselves Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040825 Camino/0.8.1 the one, and Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.8) Gecko/20071008 SeaMonkey/1.0 another, each pretending to be Mozilla, and all of them powered by Gecko.

And Gecko was good, and IE was not, and sniffing was reborn, and Gecko was given good web code, and other browsers were not. And the followers of Linux were much sorrowed, because they had built Konqueror, whose engine was KHTML, which they thought was as good as Gecko, but it was not Gecko, and so was not given the good pages, and so Konquerer began to pretend to be “like Gecko” to get the good pages, and called itself Mozilla/5.0 (compatible; Konqueror/3.2; FreeBSD) (KHTML, like Gecko) and there was much confusion.

Then cometh Opera and said, “surely we should allow our users to decide which browser we should impersonate,” and so Opera created a menu item, and Opera called itself Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 9.51, or Mozilla/5.0 (Windows NT 6.0; U; en; rv:1.8.1) Gecko/20061208 Firefox/2.0.0 Opera 9.51, or Opera/9.51 (Windows NT 5.1; U; en) depending on which option the user selected.

And Apple built Safari, and used KHTML, but added many features, and forked the project, and called it WebKit, but wanted pages written for KHTML, and so Safari called itself Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.5, and it got worse.

And Microsoft feared Firefox greatly, and Internet Explorer returned, and called itself Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) and it rendered good code, but only if webmasters commanded it to do so.

And then Google built Chrome, and Chrome used Webkit, and it was like Safari, and wanted pages built for Safari, and so pretended to be Safari. And thus Chrome used WebKit, and pretended to be Safari, and WebKit pretended to be KHTML, and KHTML pretended to be Gecko, and all browsers pretended to be Mozilla, and Chrome called itself Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13, and the user agent string was a complete mess, and near useless, and everyone pretended to be everyone else, and confusion abounded.

233 Responses to “History of the browser user-agent string”

  1. [...] Browser spoofing is an issue developers have been tackling ever since the days of Internet Explorer and Netscape Navigator. What is browser spoofing? Well, quite simply it is the ability for one browser to attempt to imitate another via the userAgent string. If you re-examine the example I provided above of what your user agent is, you may notice (depending on the browser your using) hints of other browsers. A quick test in the various browsers for me reveals words such as “Mozilla” in IE7 and “Gecko” and “Safari” in Chrome. This makes it very difficult to create a reliable and consistent browser detect, requiring a developer to constantly change their methods of browser detection. To view the history of the user agent string and browser spoofing, see http://webaim.org/blog/user-agent-string-history/ [...]

  2. [...] WebAIM: Blog – History of the browser user-agent string [...]

  3. [...] nog wel eens vreemde sprongen maken wanneer je ze op verschillende platformen testte (must-read: een korte historiek over de browseroorlog). Maar de meeste moderne browsers zijn intussen van de grootste kwaaltjes verlost. Een goed [...]

  4. [...] think that the history of user-agent string about sums up the state web in a single article. And you don’t need to be a programmer to [...]

  5. [...] fun list of what you’ll be facing in various browsers. This is, of course, all very similar to userAgent adventures; Non-standard feature that is as reliable as my old 28K [...]

  6. Johan Douma says:

    Now you can add Opera 10 to the list.
    Sorry I mean Opera 9.80 to the list…
    http://dev.opera.com/articles/view/opera-ua-string-changes/

  7. [...] History of the web browser. Elles må eg innrømma at mykje av dette innlegget er lånt frå History of the browser user-agent string av Aaron Andersen. Har du lyst til å læra deg meir om brukaragentar, og kva alle dei tala og [...]

  8. Grerwaymype says:

    visit us!
    newsbox.cc
    newsbox.us
    nbstatus.wordpress.com
    NOW!

  9. Mozilla says:

    …and between all of this, there were spiders, bots & others who were not any of the above but when they realized that sometimes they were unwanted, they pretended to be Mozilla & others so as to continue visiting pages instead of being blocked by robots.txt & scripts to reduce their visits…

  10. [...] story? Yes that’s how the browsers identify themselves when visiting sites. Not a joke. http://www.webaim.org/blog/user-agent-string-history/ Announced last week, Opera 10 and all the future versions of opera will be named 9.80 [...]

  11. [...] You can see what user agent your browser is reporting at several sites, such as useragent.org. See also: “History of the browser user-agent string.” [...]

  12. Johannes says:

    Hilarious! Thanks a lot for this great written article!

  13. [...] You can see what user agent your browser is reporting at several sites, such as useragent.org. See also: “History of the browser user-agent string.” [...]

  14. [...] that with bad habits from developers and you have a browser which despite being left behind by evolution, is artificially kept alive by large enterprises as if it were on a magical life-support machine. I [...]

  15. As I remember the first public browser with the user agent spoofing feature was OmniWeb 2.x for Nextstep. It was available in Q2/1996.

  16. [...] Edit Dla wytrwałych bajka o zdecydowanie pokręconych stringach User Agent [...]

  17. steve ross says:

    And Internet explorer started pretending that it was Google Chrome… http://blog.chromium.org/2009/09/introducing-google-chrome-frame.html

  18. [...] Mobilfunkgeräte3 E-Mail-Programme4 Suchmaschinen5 Newsreader zu “>Weblinks zu zu user-agent-string-history Die Geschichte des user-agent-string der verschiedenen Browseragentarius.net mehrsprachige [...]

  19. Steve says:

    If you are running Internet Explorer or Firefox then just change your user agent to read “Buy my product it’s the best” and avoid all that which browser is it nonsense.

  20. Derek says:

    Having excessive user agent values made the length passed from the browser to the web server cause my apache web application to issue a 500 Internal Server Error and the ultimate error was, “Premature end of script headers”. By removing some of the HKEY CURRENT USER, SOFTWARE, Microsoft, Windows, Current Version, Internet Settings, User Agent, Post Platform strings, I got the user agent value that is passed down to a size that wouldn’t trigger the 500 error and received the desired content. This was nasty to debug because everything I found on blogs and help sites have you check the unix file permissions and perl or CGI script – but since not every user was having the problem, one solution was to re-create a users profile which cleaned up the registry for that setting. This may be a problem for just my content management application, but others might be running into the 500 and Premature error as well.

  21. Bob says:

    And then came “Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.9.0.15)” which is probably Firefox but who knows anymore?

    Great article!

  22. jon says:

    “Buy my product it’s the best” string will get you problems, like websites saying

    the ‘buy my product’ browser is not supported by this site…

    The reason Opera changed its string from ‘opera 10.10′ is that websites saw ‘opera 0.1′ due to simple number scanning looking for the dot, and going ‘back one’

  23. [...] for 2008-09-11 WebAIM: Blog – History of the browser user-agent string Well played! (tags: humor browser [...]

  24. [...] Den oppmerksome leser vil kanskje stusse over at IE oppgir at UserAgent er Mozilla/4.0, dette gjør den av historiske årsaker. [...]

  25. [...] as a way to keep short ideas and opinions flowing. A runaway and unforeseen hit was Aaron’s “History of the browser user-agent string”. If you have never read it, you owe yourself this [...]

  26. Frank says:

    User-Agent was never intended to be machine parsed, or used for anything but human review of logs. That it was, is a sad and horrible mistake. No modern website should require any particular strings in the User-Agent in order to function. It is ok to look for specific, known-broken browsers using UA, and serve reduced-function code to them, but one should always code for unrecognized UA strings, and in that case serve standards-compliant html. Use javascript, but don’t make your site break if it is ignored (eg javascript disabled).

    Sites that only work for recognized UA strings, or that use javascript for links (instead of A HREF) are horribly broken.

  27. [...] 原文:http://webaim.org/blog/user-agent-string-history/ 一直对浏览器的user agent字串的一团浆糊搞不明白,现在终于知道了这段搞笑的历史。 [...]

  28. Yuhong Bao says:

    “and so Internet Explorer declared that it was “Mozilla compatible” and began to impersonate Netscape, and called itself Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)”
    Which started with version 2.0, BTW. Version 1.0 used a different user agent.

  29. Yuhong Bao says:

    “And then Google built Chrome, and Chrome used Webkit, and it was like Safari, and wanted pages built for Safari, and so pretended to be Safari…”
    Yep, Hotmail was responsible for that particular case, BTW.

  30. [...] History of the browser user-agent string [...]

  31. Kapil says:

    Nice and interesting :)

  32. [...] bestellt zu haben. Vielleicht ist aber das ausschließliche Auftreten von Linux und Mac OS im User-Agent-String für Marketingexperten noch kein Hinweis auf die Betriebssystempräferenzen. Außerdem [...]

  33. [...] Chrome) in ihrem User-Agent das Wörtchen “Mozilla” am anfang stehen haben, ist hier (als nette kleine Geschichte) [...]

  34. Hung Won Ahn says:

    Thanis for the “NEWER” Testament, After B.C. (Browser Creation.)
    Now just tell us which ones we can IGNORE. We’d like to match the opinions
    that we all hold.

  35. [...] as a way to keep short ideas and opinions flowing. A runaway and unforeseen hit was Aaron’s “History of the browser user-agent string”. If you have never read it, you owe yourself this [...]

  36. Xev says:

    Informative and amusing.

    Well done !

  37. mabdul says:

    hey, you’re blog entry is good, but then you should add that opera introduced a new and maybe better ua by dropping all and go back to the roots and identifying itself something like:

    Opera/9.80 (Macintosh; Intel Mac OS X; U; de) Presto/2.2.15 Version/10.10
    what about tha?

    mabdul

  38. KeV says:

    “Sites that only work for recognized UA strings, or that use javascript for links (instead of A HREF) are horribly broken.”

    Hear, Hear, Actually Listen don’t hear it.
    Javscript and flash should be a LAST resort and w3c should be clearer on this.

    “And Microsoft sold IE with Windows, and made it better than Netscape”

    Are you sure, I’m a bit too young to know but my parents certainly thought netscape was much better than IE.

  39. Chris says:

    @ KeV and a few more Ands.
    IE was good when it came out, but that is not why Netscape lost the war of course.

    >Javascript and flash should be a LAST resort
    >Sites that only work for recognized UA strings, or that use javascript for links (instead of A HREF) are horribly broken

    Amen to that!

    And IE took over the world without a battle. And MS corrupted all standards so IE6/IIS would dominate forever*. And MS said IE6 was perfect and the browser could never be made better and stopped any development.
    And Firefox came along and scared MS into working on IE7.
    And now MS is begging for corporations to move on from IE6, but they can’t because all their intranets only work with the IE6 broken standards, which is no surprise as it was MS’s original plan (see * above).

    Good write-up, thanks.

  40. [...] на английском. Я лично буду опираться на статьи «History of the browser user-agent string» и «History of the user-agent string». Сама по себе история [...]

  41. Jeremy says:

    Well, this is my User Agent String. Nice and simple
    Midori/0.2 (X11; Linux; U; en-us) WebKit/531.2+

  42. Magnus says:

    Yep. And this is how my phone presents itself:

    Mozilla/5.0 (Linux; U; Android 2.1-update1; en-gb; Nexus One Build/EPE54B) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17

  43. Gift Shop says:

    Firefox is like this.
    Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1)

  44. [...] if you get a chance, please read this hilarious article by Aaron Andersen that documents the history of the user agent [...]

  45. [...] habe ich aber auch einen Beitrag der die Recherche mehr als lohnenswert gemacht hat: Dieser Beitrag im WebAIM Blog beschreibt auf sehr beeindruckende Weise den Weg eines Browseridentifikationstextes vom ersten [...]

  46. Joshua Issac says:

    IE9′s like:
    Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

  47. [...] even more curious about why this user agent string business is such a mess, I recommend you read this story — apart from being informative, it’s also [...]

WebAIM is an initiative of:
Center for Persons with Disabilities (CPD) Utah State University