Why does the browser User-agent (browser type) always have the word Mozilla?

Are you curious about the User-Agent that identifies the browser's identity, why each browser has the word Mozilla?

Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.94 Safari/537.36
Mozilla/5.0 (Linux; U; Android 4.1.2; zh-tw; GT-I9300 Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)
The story has to start from the beginning. The original protagonist is called NCSA Mosaic, or Mosaic for short.It is a browser developed by the National Center for Supercomputing Applications (NCSA) 
at the University of Illinois at Urbana-Champaign in late 1992 and released in 1993.
It calls itself "NCSA_Mosaic /2.0 (Windows 3.1 )", Mosaic can display text and pictures at the same time, and the browser has become much more interesting since then.

However, another browser soon appeared, which is the famous Mozilla, Chinese name Mothra.
It is said that Mozilla = Mosaic + Killer, which means Mosaic killer, and there is also a saying that Mozilla = Mosaic & Godzilla, which means mosaic and Godzilla.
Mozilla's original mascot was a green lizard, which was later changed to a red tyrannosaurus, which looked the same as Godzilla.

But Mosaic was very unhappy about this, so later Mozilla changed its name to Netscape, which is Netscape.
Netscape calls itself "Mozilla /1.0 (Win3.1 )" and things start to get more interesting.
Netscape supports frames, which became popular due to everyone's preference, but Mosaic doesn't support frames.
The webmaster then probes the user agent and sends pages with frames to Mozilla browsers and pages without frames to non-Mozilla browsers.

Netscape later made fun of Microsoft, calling Microsoft's Windows "hardware drivers that weren't debugged."
Microsoft is angry, and the consequences are serious. Microsoft has since developed its own browser, which is Internet Explorer, and hoped that it could become the Netscape Killer.
IE also supports frames, but it's not Mozilla, so it doesn't always receive pages with frames.
Microsoft was very depressed and quickly lost its temper. It didn't want to wait until all webmasters knew about IE and sent IE a framed page. It chose to declare that IE was compatible with Mozilla,
And imitate Netscape to call IE "Mozilla /1.22 (compatible; MSIE 2.0; Windows 95 )", so IE can receive pages with frames, all Microsoft people are happy, but webmasters start to faint.

Because Microsoft bundled IE with Windows and made IE better than Netscape, the first bloody browser war broke out. As a result, Netscape withdrew from the stage of history with failure, and Microsoft was even more hilarious.
But I didn't expect that Netscape was reborn under the name of Mozilla and developed Gecko, this time it called itself: 
  "Mozilla
/5.0(Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 ". Gecko is a rendering engine and it's great. Mozilla later 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 ".
Firefox is doing great, Gecko is taking over, and other new browsers use its code, and refer to themselves as:
  "Mozilla
/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040825 Camino/0.8.1", and

  "Mozilla/5.0 ( Windows; U; Windows NT 5.1; de; rv:1.8.1.8) Gecko/20071008 SeaMonkey/1.0 ”, Each pretends to be Mozilla, and they all use Gecko. Gecko was great and IE couldn't keep up with it at all, so the user agent detection rules changed and browsers using Gecko were sent better code, while other browsers didn't have that treatment. Linux followers are sad about this, because they wrote Konqueror, its engine is KHTML, they think KHTML is as good as Gecko, but don't get good pages because it's not Gecko, So Konqueror began to disguise itself as "like Gecko" in order to get better pages, and called itself "Mozilla /5.0 (compatible; Konqueror/3.2 ; FreeBSD) (KHTML, like Gecko)". Since then the user agent has become more confusing. At this point Opera jumped out and said, "There is no doubt that we should let users decide which browser they want us to pretend to be". So Opera simply created a menu item to let the user choose to make the Opera browser
  "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)".

Later, Apple developed the Safari browser and used KHTML as the rendering engine, but Apple added many new features, so Apple branched off from KHTML and called it WebKit, but it didn't want to abandon those pages written for KHTML,
So Safari called itself "Mozilla /5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.5 ", further adding to the confusion of the user agent.

因为微软十分忌惮Firefox,于是IE重装上阵,这次它自称为“Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) ”,并且渲染效果同样出色,但是需要网站管理员的指令它这么做才行。

再后来,谷歌开发了Chrome浏览器,Chrome使用Webkit作为渲染引擎,和Safari之前一样,它想要那些为Safari编写的页面,于是它伪装成了Safari。
于是Chrome使用WebKit,并将自己伪装成Safari,WebKit伪装成KHTML,KHTML伪装成Gecko,最后所有的浏览器都伪装成了Mozilla,这就是为什么所有的浏览器User-Agent里都有Mozilla。
Chrome自称为“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”。

因为以上这段历史,现在的User-Agent字符串变得一团糟,几乎根本无法彰显它最初的意义。
追根溯源,微软可以说是这一切的始作俑者,但后来每一个人都在试图假扮别人,最终把User-Agent搞得混乱不堪。

一句话结论:因为网站开发者可能会因为你是某浏览器(这里是 Mozilla),所以输出一些特殊功能的程序代码(这里指好的特殊功能),
所以当其它浏览器也支持这种好功能时,就试图去模仿 Mozilla 浏览器让网站输出跟 Mozilla 一样的内容,而不是输出被阉割功能的程序代码。
大家都为了让网站输出最好的内容,都试图假装自己是 Mozilla 一个已经不存在的浏览器。
附各大浏览器诞生年表:

    1993年1月23日:Mosaic
    1994年12月:Netscape
    1994年:Opera
    1995年8月16日:Internet Explorer
    1996年10月14日:Kongqueror
    2003年1月7日:Safari
    2008年9月2日:Chrome
    
    注:本文转自简明现代魔法。

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325241744&siteId=291194637