
The Cookie Technology
restrictions and limitations
-
Maximum Cookie Size
Cookies can't be used to store arbitrarily large pieces of data.
The maximum size of a cookie is limited to 4KB. To store larger data
sets, you could break the data into several chunks and send each off in
its own cookie. Or, even better, you could store uer data in a database
on the server and send the client only a "cookie receipt".
-
Maximum Number of Cookies
For Netscape, domains can only set a maximum of 20 cookies each
on a specific client. Also, the cookie area may only hold a maximum
of 300 total cookies from all sources. For each cookie past the limits,
the least recently used cookie is deleted. Some browsers can store
more than 300 cookies.