I was wondering if anyone knows whether there is a maximum size limit on a cookie content
If so,
1) Is this a limit per cookie in a single domain? i.e. no single cookie value can exceed XX bytes
2) Is this a limit on all the cookies that get saved under a single domain? i.e. the total size of all the cookies cannot exceed XX bytes
3) Is the limit different from browser to browser?
4) How can I detect what the limit is?
With Firefox and Opera you are talking 4092 and 4091 string length respectively, IE is more. Apache errors out on about 6kB of cookie and will not serve the request at all.
Your best solution if you need more than 4k would be to use sessions and just save an identifier in the cookie. Sessions allow for a lot more information than cookies do they just don't allow you to save anything between browser sessions so you will need to save the session data in a file or database and use the cookie to identify which data to retrieve to set up the session for the next visit.
Bookmarks