《Disney +》 迪士尼、Marvel、彼思、星球大戰…  彩虹社Vtuber「笹木咲」「椎名唯華」連帽衫發售!   「PS VR亮點」挾精采更新回歸   在Binance NFT市場上僅一秒完售的NFT遊戲「Kryptomon」推出Phase 1!   寶可夢變成動作RPG?!官方發表系列新作「寶可夢傳說 阿爾宙斯」!這次將在很久以前的神奧地區展開冒險!   今日起登陸PS4的《經典回歸 魔界村》會怎麼呈現協力模式?   頭等艙愛情故事   重寫歷史 – 《Alan Wake》重製版將使作家的故事登陸 PS4 和 PS5   Ghost of Tsushima: Legends(奇譚模式)9月3日單獨發售 追加對抗賽模式 

瀏覽器的 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

隨機商業新聞

Disney+