什么是现代浏览器的当前Cookie限制? [英] What are the current cookie limits in modern browsers?

查看:281
本文介绍了什么是现代浏览器的当前Cookie限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是通用的cookie限制的现代浏览器,截至2011年?我特别感兴趣的:

What are the generic cookie limits for modern browsers, as of 2011? I'm particularly interested in:


  • 一个cookie的最大尺寸

  • 每个主机/域名+路径饼干最大数量

  • 每个主机/域名的Cookie数量最多

  • 在给定的浏览器所有Cookie的
  • 最大数/最大总规模
  • Max size of a single cookie
  • Max number of cookies per host/domain name + path
  • Max number of cookies per host/domain name
  • Max number / max total size of all cookies in a given browser

我知道 RFC 2109 指定的:


  • 在至少300饼干

  • 每个Cookie至少4096字节
  • (由构成该cookie非末端在Set-Cookie头的语法描述的字符的尺寸测量)
  • 每个唯一的主机或域名至少20个Cookie

  • at least 300 cookies
  • at least 4096 bytes per cookie (as measured by the size of the characters that comprise the cookie non-terminal in the syntax description of the Set-Cookie header)
  • at least 20 cookies per unique host or domain name

但什么是现实世界的规格?

but what are real-world specs?

推荐答案

下面是测试它一个方便的工具: HTTP://browsercookielimits.squawky。净/

Here's a handy tool to test it: http://browsercookielimits.squawky.net/

它揭示了很多有关对饼干的内部细节。点击为当前的浏览器运行测试的结果(只需要片刻)。

It reveals quite a lot about the internal details regarding cookies. Click "Run Tests for Current Browser" for the results (it only takes a moment).

例如,我跑了所有测试谷歌浏览器10.0.648.134测试:

For example, I ran all tests for Google Chrome 10.0.648.134 beta:

 17:56:20.962: Max Cookies with Character Length 0 and character "a": 180
 17:56:25.400: Max Cookies with Character Length 0 and character "a": 180
 17:56:39.827: Starting
 17:56:39.991: Max Cookies with Character Length 3 and character "1": 180
 17:56:42.73: Max Cookie Character Length using character "1": 4096
 17:56:46.648: Max Cookies with Character Length 4096 and character "1": 180
 17:56:47.386: Max Cookie Character Length using character "ÿ": 2049
 17:56:50.883: Max Cookies with Character Length 2049 and character "ÿ": 180
 17:56:50.938: Guessing Max Cookie Count Per Domain: 180
 17:56:50.938: Guessing Max Cookie Size Per Cookie: 4096 bytes
 17:56:50.939: Guessing Max Cookie Size Per Domain: NA


这答案是pretty老了,但我只是检查结果为最新的Chrome版本(38.0.2125.111),而且他们基本上是相同的。


This answer is pretty old, but I just checked results for the latest Chrome version (38.0.2125.111), and they're essentially the same.

这篇关于什么是现代浏览器的当前Cookie限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆