Some Browser Cookie gotchas from research and personal testing:
- IE6 and IE7 Support max 20 cookies per domain.
- If you set a 21st cookie the oldest cookie is no longer available to the server
- IE6 has a bug where the max length of all cookies combined can be no more than 4096bytes (the RFC states a browser should support 20 cookies up to 4096 bytes PER cookie).
- IE stores cookies for a domain and its subdomains separately, so you can store 20 cookies in each of abc.foobar.com, foobar.com and xyz.foobar.com. In such a scenario going to abc.foobar.com you will have access to a total of 40 cookies (20 set for domain foobar.com and 20 for abc.foobar.com)
After the August 2007 IE update:
- IE7 supports max 50 cookies per domain, but the 4096 limit still exists!
Note that regardless of the above, reports seem to indicate that Opera had a 30 cookie limit (not sure if this is still true).
****Even if a browser supported unlimited cookies, the more cookies you set for your domain the slower a site gets!!!*****
Good Practice:Set paths for your cookies. IE and other browsers only send cookies to the server if the requested URL matches the path of a cookie. This can potentially save alot of bandwidth and improve performance. For instance if I am setting forum specific cookies I would set the path to /forums/.
web development wwii world war ie6 ie7 cookies
Here's the relevant passage from the RFC: