Alex Rivera | Logout

What is the maximum size of a cookie file?

Asked 2010-06-24T03:54:58.830
18

Are there any limitations on the size of the cookie? Also, is this browser dependent?

Edit
Report

1 Answer

8

Importantly the official cookie spec RFC 2965 states the minimums browser should adhere to:

5.3 Implementation Limits 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 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

User agents created for specific purposes or for limited-capacity devices SHOULD provide at least 20 cookies of 4096 bytes, to ensure that the user can interact with a session-based origin server.

The information in a Set-Cookie2 response header MUST be retained in its entirety. If for some reason there is inadequate space to store the cookie, it MUST be discarded, not truncated. Applications should use as few and as small cookies as possible, and they should cope gracefully with the loss of a cookie.

Read more: http://www.faqs.org/rfcs/rfc2965.html#ixzz0rjy5CJQa

From the cookie FAQ:

Microsoft saves cookies into the "Temporary Internet Files" folder, a system folder that you can set the maximum size of (the default is 2% of

answered 2010-06-24T04:14:57.000

Your Answer