On Thu, April 13, 2006 7:03 pm, Jochem Maas wrote:
>> One example, each domain has a limit of cookies (20) and you can use
>
> I wasn't aware that there was a hard limit on cookies - I always
> thought
> this was a browser dependent setting ... not that I ever get above
> 2 cookies max (and mostly just 1 for the session cookie).

Not only are browsers free to ignore more than X cookies they are also
allowed to purge anything more than Y bytes in the cookies from any
given domain.

[nb]
You really should read the original Netscape Cookie spec -- it's short
and clear and concise, and possibly one of the best-written specs out
there, in some ways.
[/nb]

So I would never recommend serializing a bunch of data to get it all
into one cookie.  imho.

Better to give the browser ONE cookie and use that to track everything
else on the server in a session.

This also matters for bandwidth -- It would do Google no good at all
to trim down their homepage to the Nth degree like they do, if they
sent an extra 100K of coookie data back and forth all the time.

Remember:
Whatever you SEND in the Cookie, the browser has to send BACK on every
page hit, every image hit, the CSS, the javascript requests, all of
them, to the same domain.

Serialized data is seldom "small" so even a handful of datastructures
being sent back by the browser on every request could add up quickly.

The user has to wait for that data to get to your server, after all,
before they can even BEGIN to get your content back.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to