Re: A Rant and Question about cookies

From: Date: Thu, 03 Aug 2000 20:07:30 +0000
Subject: Re: A Rant and Question about cookies
Groups: php.general 
Request: Send a blank email to php-general+get-10028@lists.php.net to get a copy of this message
> Subject: Re: [PHP] A Rant and Question about cookies > > > Today I was locked out of a site I've been using for almost a year > > because they require cookies,[...] > > You can't have > > an infinite number of cookies on your hard drive and with everyone > > issuing cookies and some places now requiring cookies....doesn't it all > > become a little self-defeating....cookies I mean. > > > > Or am I missing the concept of cookies and how they work. > > Cookies are best used in session mode. Session cookies are never written > to disk and only exist for the duration of the session. In that mode they > are extremely useful and I really wish they were treated differently from > long-term cookies by the client browsers out there. > > -Rasmus I agree completely -- and it is a shame that session cookies are tarred by all the hysteria over "durable" cookies that get written to disk. As to the original question, thought, I quote from the document athttp://home.netscape.com/newsref/std/cookie_spec.html (and I am not certain as to how current it is!): There are limitations on the number of cookies that a client can store at any one time. This is a specification of the minimum number of cookies that a client should be prepared to receive and store. 300 total cookies 4 kilobytes per cookie, where the name and the OPAQUE_STRING combine to form the 4 kilobyte limit. 20 cookies per server or domain. (note that completely specified hosts and domains are treated as separate entities and have a 20 cookie limitation for each, not combined) Servers should not expect clients to be able to exceed these limits. When the 300 cookie limit or the 20 cookie per server limit is exceeded, clients should delete the least recently used cookie. When a cookie larger than 4 kilobytes is encountered the cookie should be trimmed to fit, but the name should remain intact as long as it is less than 4 kilobytes. Cheerio, Rick Rodgers

« previous php.general (#10028) next »