瀏覽器User-agent簡史(user-agent)

    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.html

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.web

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.chrome

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.app

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.less

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.ide

share from http://webaim.org/blog/user-agent-string-history/post

  譯文:

  起初東邊來一瀏覽器叫 NCSA Mosaic,自稱 NCSA_Mosaic/2.0 (Windows 3.1),渲染網頁圖文並茂,人民羣衆見了喜大普奔。
  而後西邊來一瀏覽器叫 Mozilla,就是「乾死 Mosaic」的縮寫。Mosaic 不高興了,Mozilla 悻悻更名網景,但仍是自稱 Mozilla/1.0 (Win3.1),人民羣衆見有新瀏覽器用更加喜大普奔。網景獨創網頁框架,框架深得羣衆歡心。惋惜 Mosaic 不認識框架,爲了少麻煩智慧的勞動人民創造了 UA 探測:管本身叫 Mozilla 的有框架,無論本身叫 Mozilla 的一概不給發框架!
  網景作大了開始戲耍微軟開心,管 Windows 叫「藍屏死機爛驅動」。微軟怒從中來,誓言本身作瀏覽器搞死網景,因而還真的作出了個 Internet Explorer。IE 有框架可又不是 Mozilla,因而見到陌生人的服務器紛紛發沒框架卡:對不起,你是一個 Mosaic。微軟沒耐心了,感到等到網管搞清楚 IE 是啥大概要猴年馬月,因而讓 IE 說本身是 Mozilla 兼容以便冒充網景——自稱 Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)。今後 IE 也有了框架用,微軟上下喜大普奔,莫名奇妙的 UA 卻搞得各家網管暈頭轉向。
  Windows 開始捆綁 IE,IE 越作越好遠勝網景,因而第一次瀏覽器大戰打響了。結果網景慘敗,微軟上下喜大普奔,卻沒注意到死後的網景涅盤成了 Mozilla 基金會。Mozilla 製做了 Gecko,自稱 Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826,裏面的 Gecko 是個優秀的渲染引擎。Mozilla 後來又成了火狐,自稱 Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.5) Gecko/20041108 Firefox/1.0,火狐是極好的。Gecko 又開始增殖擴張,很多瀏覽器站在 Gecko 的肩膀上紛紛誕生,之中一個叫 Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040825 Camino/0.8.1,還有一個叫 Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.8) Gecko/20071008 SeaMonkey/1.0。這些瀏覽器個個都僞裝是 Mozilla,同時個個都有 Gecko 的心裏。
  Gecko 是好的,而 IE 又不行了,因此 UA 探測又煥發生機了:說本身有 Gecko 的瀏覽器有好網頁,剩下的瀏覽器不合標準的殘羹剩飯湊合吃吧。可是 Linux 用戶不滿了——由於他們有心裏是 KHTML 的 Konqueror,而他們以爲本身的 KHTML 和 Gecko 同樣棒。但是 KHTML 不是 Gecko,因此在服務器的眼裏只能和 IE 一塊兒扒剩飯吃。所以 Konqueror 開始自稱「相似 Gecko」,全名 Mozilla/5.0 (compatible; Konqueror/3.2; FreeBSD) (KHTML, like Gecko)。各家網管再次暈頭轉向。
  這 時候自由派的 Opera 來了,說「冒充誰,用戶決定!」因此 Opera 創造了一個菜單,依據用戶的選擇,Opera 能夠是 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 9.51,或者 Mozilla/5.0 (Windows NT 6.0; U; en; rv:1.8.1) Gecko/20061208 Firefox/2.0.0 Opera 9.51,還能夠是 Opera/9.51 (Windows NT 5.1; U; en)。
  之 後蘋果又搞了 Safari,拿來了 KHTML,敲敲打打修修補補一番滿意以後改稱 WebKit。Safari 想要用給 KHTML 準備的網頁,所以自稱 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.5。這個世界愈發混亂了。
  微軟害怕 Firefox 搶佔市場,所以 IE 再度迴歸,自稱 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)。IE 8 是能渲染好網頁的——不過只限網管明確命令它如此作的狀況下。
  而後谷歌又有了 Chrome,Chrome 和 Safari 同樣用 WebKit,因此想要用寫給 Safari 的網頁,因而就僞裝本身是 Safari。WebKit 又僞裝本身是 KHTML,KHTML 僞裝本身是 Gecko,而全世界全部瀏覽器又都僞裝本身是 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,明眼人都能看出來這名字亂的一塌糊塗幾乎一點用都沒有。這時候一羣瀏覽器互相冒充,已經到了全部人都搞不清楚的地步了。

相關文章
相關標籤/搜索