我知道一个 cookie 可以容纳多少数据是有限制的,但是我们可以设置多少个 cookie 有限制吗?
最佳答案
来自 http://www.ietf.org/rfc/rfc2109.txt
Practical user agent implementations have limits on the number and size of cookies that they can store. In general, user agents' cookie support should have no fixed limits. They should strive to store as many frequently-used cookies as possible. Furthermore, general-use user agents should provide each of the following minimum capabilities individually, although not necessarily simultaneously:
* 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
关于cookies - 我们可以为一个域设置多少个 cookie?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5281827/