Why browser User-agent always have Mozilla words

Source: Internet
Author: User

Recently in the study of computer networks, the browser's HTTP request message has been known, found an interesting phenomenon. Search for a moment, find the following article, laughing at me.

Are you curious about the user-agent that identifies the browser identity, and why each browser has the Mozilla word?

mozilla/5.0(Windows NT6.1; WOW64) applewebkit/537.36(khtml, like Gecko) chrome/27.0. 1453. 94safari/537.36mozilla/5.0(Linux; U Android4.1. 2; Zh-TW;GT-i9300build/jzo54k) applewebkit/534.30(khtml, like Gecko) version/4.0Mobile safari/534.30mozilla/5.0(Windows NT6.1; WOW64; Rv:20.0) gecko/20100101firefox/20.0mozilla/5.0(Compatible; MSIE9.0; Windows NT6.0; trident/5.0)

The story has to start from the beginning, the original protagonist called NCSA Mosaic, abbreviated as MOSAIC (mosaic), is the University of Illinois at Urbana-Champaign at the end of 1992, the National Super Computer Application Center for Supercomputing Applications, abbreviated as NCSA), was developed and published in 1993 as a browser. It calls itself "ncsa_mosaic/2.0 (Windows 3.1)", Mosaic can display both text and pictures, and this browser becomes much more interesting.

However soon there was another browser, which is known as Mozilla, the Chinese name Mothra. One said Mozilla = Mosaic + Killer, meaning Mosaic killer, also has the saying is Mozilla = Mosaic & Godzilla, meaning mosaic and Godzilla, and Mozilla's original mascot is only a big green lizard, later changed to Red Tyrannosaurus rex, It looks like Godzilla.

But Mosaic was very unhappy about it, and then Mozilla changed its name to Netscape, also known as Netscape. Netscape self-proclaimed "mozilla/1.0 (Win3.1)", things began to become more interesting. Netscape Support Framework (frame), because everyone likes the framework became popular, but Mosaic does not support the framework, so the Webmaster Probe User agent, the Mozilla browser to send a page containing frames, to non-Mozilla browser send a page without frames.

Later Netscape was happy with Microsoft, calling Microsoft's Windows "Hardware Drivers Without Debugging". Microsoft is very angry, the consequences are very serious. Since then, Microsoft has developed its own browser, which is Internet Explorer and wants it to be a Netscape Killer. IE also supports frames, but it is not Mozilla, so it is always not receiving pages that contain frames. Microsoft very depressed quickly sank, it does not want to wait until all the webmaster to understand IE and send the page containing frames to IE, it chose to announce that IE is compatible with Mozilla, and imitate Netscape called IE "mozilla/1.22 (compatible; MSIE 2.0; Windows 95) ", so IE can receive a page containing frames, all Microsoft's people are hi-skinned, but the webmaster began to faint.

Because Microsoft will sell IE and Windows bundle, and make IE better than Netscape, so the first browser bloody war broke out, the result is Netscape to fail to exit the historical stage, Microsoft more hi leather. But unexpectedly Netscape in the name of Mozilla Reborn, and developed the gecko, this time it calls itself "mozilla/5.0 (Windows; U Windows NT 5.0; En-us; rv:1.1) gecko/20020826 ".

Gecko is a rendering engine and excellent. 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 performance is excellent, Gecko also began to Gongchenglvede, other new browsers use its code, and they call themselves "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 of them pretends to be Mozilla, and they all use Gecko.

Gecko is excellent, and IE can't keep up with it, so the user agent detection rule is changed, and the browser using gecko is sending better code, while other browsers do not. Linux followers are very sad because they wrote Konqueror, whose engine is khtml, they think khtml and gecko as good, but because not gecko and not get a good page, so Konqueror to get a better page start to disguise themselves as "Like Gecko", and claiming to be "mozilla/5.0" (compatible; konqueror/3.2; FreeBSD) (khtml, like Gecko) ". Since then the user agent has become more chaotic.

There is no doubt that we should let the user decide which browser they want us to pretend to be. "So opera simply created a menu item to let the user choose the Opera browser to become" 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) ".

Apple later developed the Safari browser and used khtml as the rendering engine, but Apple added many new features, so Apple called WebKit from the Khtml branch, but did not want to abandon the pages written for Khtml, so Safari calls itself "mozilla/ 5.0 (Macintosh; U PPC Mac OS X; De-de) applewebkit/85.7 (khtml, like Gecko) safari/85.5 ", which further exacerbated the confusion of the user agent.

Because Microsoft is very wary of Firefox, so IE Reloaded, this time it called itself "mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) ", and the rendering works equally well, but requires the webmaster's instructions to do so.

Later, Google developed Chrome, Chrome uses WebKit as the rendering engine, and as before Safari, it wanted those pages written for Safari, so it disguised as safari. So Chrome used WebKit and disguised itself as Safari,webkit disguised as khtml,khtml disguised as Gecko, and finally all the browsers disguised as Mozilla, That's why Mozilla is available in all browsers user-agent. Chrome calls 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 ".

Because of this history, the current user-agent string becomes a mess, almost impossible to reveal its original meaning. Traced to it, Microsoft can be said to be the initiator of all this, but then everyone is trying to impersonate others, and eventually make user-agent mess.

One sentence conclusion : Because the website developer may be because you are a certain browser (here is Mozilla), so the output some special function of program code (here refers to the good special function), so when other browsers also support this good function, try to imitate Mozilla The browser lets the website output the same content as Mozilla, rather than the program code that outputs the castrated function. Everyone tries to pretend that they are a browser that does not already exist in order to get the best content out of the website ...

With the advent of the major browser chronology:
-January 23, 1993: Mosaic
-December 1994: Netscape
-1994: Opera
-August 16, 1995: Internet Explorer
-October 14, 1996: Kongqueror
-January 7, 2003: Safari
-September 2, 2008: Chrome
Note: This article turns from concise modern magic.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Why browser User-agent always have Mozilla words

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.