Hi There,
I'm starting to make more use of cookies to save states of windows, default variables, etc. My question is this:
When I write a php script, I have access to any cookie set on that domain by the array $_COOKIE or $HTTP_COOKIE_VARS. Since headers aren't sent out mid-file I suspect, my dear Watson, that when the browser sends a page request to the server, it ALWAYS by default sends out cookies in the header. Is this actually what happens??
If it is, I'd be interested in knowing performance issues. You can have 20 cookies per domain, I think 4096 characters each. A quarter of that is 5x4096=20k over head that gets sent on each page request. That's not too bad but on dial-up connections it would be noticeable (especially going upline vs. down).
Please correct me if I don't understand how this works, or let me know if the performance question is valid.
Thanks,
Sam Fullman
Compass Point Media
[P.S. one more thing -- any way on a per-page basis to supress the browser from sending cookie headers on pages that won't need it? :-)]