如果引用或轉貼,麻煩註明出處與本網誌連結,否則視為侵權。

2011年11月8日

網路專有名詞Cookie(指HTTP Cookie)由來

作者 : Fred F.M. Wang on 2011-11-8

這是個有趣的問題,為什麼用了那麼久,還是不知道網站技術的Cookie的命名是怎麼來的? 為何要叫做Cookie?

首先這個機制發明者是1994年Netscape瀏覽器的開發人員之一 Lou Montulli,為解決online shopping cart的問題,將通過Server端認證的身分識別資訊儲存在用戶端,以後每次進入網站檢查儲存在Cookie的認證資料就可以了, ( 他將此資訊形式稱為Cookie ),以減少用戶重複的登入與身份認證程序。

Lou表示Cookie源於當時(90年代) UNIX programmer慣用的詞彙"Magic Cookie” [1],係指在程式間傳送,用來讓接收端執行一些動作的訊息("Something passed between routines or programs that enables the receiver to perform some operation."),而Magic Cookie發明者不可考,有一種說法是源於80年代末期到90年代早期的電腦遊戲,在該遊戲中吃掉魔術餅乾可以有特殊的能力[2] (有點像早期任天堂的馬力兄弟遊戲)。

電腦技術人員喜歡打電動,而用電腦遊戲中的名詞命名的說法是比較可信的。

註 :
1.上面資訊經過Andrew Stuart寫信向發明者Lou Montulli詢問證實,如下http://dominopower.com/article/where-cookie-comes-from/,在下面連結http://www.cookiecentral.com/faq/#1.2 中也列出Lou Montulli自己的答覆。

2.何謂Cookies, https://www.opra.doi.state.ma.us/Home/OPRA_Cookies.asp

3.網路上另一種說法(錯誤)是,Cookie因為要當作識別用,每一個用戶的Cookie包含的內容都不相同,就好像Fortune Cookies(幸運餅乾,咬開後餅乾內的空心部分會有張小紙條,寫著你今天會有好運或一句勉勵的話),每一餅乾裡面的紙條都不太一樣。(當然用Java/Javascript要搭配吃Cookies也是錯誤的)

4. Magic Cookie由來有兩種說法
a. Commonwealth of Massachusetts (https://www.opra.doi.state.ma.us/Home/OPRA_Cookies.asp)
"Cookies for the internet were originally developed in 1995 by the Netscape Communications Corporation. The word "cookie" comes from "magic cookie," a computer science term for a piece of information shared between co-operating pieces of software. So where does "magic cookie" come from? Some say it comes from the computer games of the late 80's & early 90's. Eating Magic Cookies in the game would give the player special powers. " (吃魔術餅乾的電腦遊戲)
註: 這是麻州的一個政府單位發布的

b. AboutCookies.org (http://www.aboutcookies.org/Default.aspx?page=5)
"Cookies for the internet were originally developed in 1995 by the Netscape Communications Corporation. The word 'cookie' comes from 'magic cookie,' a term in programming languages for a piece of information shared between co-operating pieces of software. The choice of the word cookie appears to come from the American tradition of giving and sharing edible cookies." (根據美國分享餅乾的傳統典故,因此以cookie表示軟體各部分間資訊分享的部份)
註 : AboutCookies是由Pinsent Masons法律事務所所提供的網站,致力於提供有關偵測,控制與刪除不同瀏覽器Cookies的相關資訊。

沒有留言:

張貼留言

歡迎提供意見, 謝謝 (註 : 留言經過版主審核通過才會發布)