《Disney +》 迪士尼、Marvel、彼思、星球大戰…  《零 ~濡鴉之巫女~》重製版登場!官網、PV&初回特典情報公開!   營運即將開始!官方播出了「NieR Re[in]carnation」的直播節目#1!並提供事前下載!   PS Blog 2021年度遊戲:得獎名單   懷舊磁碟卡搖身一變成為卡片套!「FC磁碟機造型卡套系列」發售!   《Sackboy: A Big Adventure》主題音樂大串聯   爭奪寶座:加入我們最新的PlayStation社群活動,就有機會贏取PS5主機一台等各種獎項   本週的《Destruction AllStars》:青牙挑戰系列賽、第一季內容搶先報,以及更多內容   「任天堂直面會」將於日本時間2月18日早上7點起進行直播!並且有大約50分鐘的豐富內容! 

瀏覽器的 Cookie 容量限制

商業

瀏覽器的 Cookie 是做登入、紀錄、追蹤等等,最常使用的工具。

不過現在 Cookie 要放的東西越來越多,Cookie 到底可以塞的容量是多少呢?

  • 註1:照標準應該是 4096 bytes,不過瀏覽器實作時,都可能會有些落差~
  • 註2:下述取自此篇:RFC-2965 HTTP State Management Mechanism
    • Practical user agent implementations have limits on the number and size of cookies that they can store.
      • at least 300 cookies
      • at least 4096 bytes per cookie (as measured by the characters that comprise the cookie non-terminal in the syntax description of the Set-Cookie2 header, and as received in the Set-Cookie2 header)
      • at least 20 cookies per unique host or domain name

瀏覽器的 Cookie 容量限制 - 2018

IE、Chrome、Firefox、Safari 等等,允許 Cookie 的容量限制是如何,可以參考此篇:chrome cookie size limit(下述摘錄自此篇)

  • According to RFC 1012 cookie size must not be limited by user agent. But the minimum capabilities of a browser or user agent should be at least 4096 bytes per cookie. This limit is applied to the name=value portion of the cookie only.
  • So some browsers can support longer cookies as well. List :
    • Internet Explorer 8 allowed cookies up to 4095 bytes
    • Chrome 9 allowed cookies up to 4096 bytes
    • Opera 11 allowed cookies up to 4096 bytes
    • Safari 5 allowed coookies up to 4097 bytes
    • Firefox 3.6.3 allowed cookies up to 4097 bytes

建議下述此篇必看,這篇有更詳細的「清單」與「即時測試」的功能,此篇除了 Size 外,還有每個 Domain 的 Max Cookie 可以設定的數量在各個瀏覽器版本的資訊。

  • 詳見:Browser Cookie Limits - 大多數都是每個 Cookie size 4096 bytes,每個 Domain Cookie Max size 也是 4096 bytes 上下居多 (更新到 2017年)

相關網頁

Tsung

隨機商業新聞

Addidas