Thanks for the link to Netscape's cookie page but despite reading through it and other standards pages dealing with this area (like the HTTP 1.1 and CGI) I still don't get it. I'm sure it's something simple that I am missing and that the light will come on soon but...
I understand that a cookie header should not be cached (at least according to Netscape's original paper on this).
I understand that proxies and other cache mechanisms are supposed to keep an open channel of communication between the server sending an HTTP cookie header (i.e. "Set-Cookie: ...") and a client responding with a cookie when sending an HTTP request to the server.
What I don't understand is...
How does a cache send me back a cookie? Attached to the original URL?
Does a cache send a visitor a cached copy of my page content (which has been cached as a static page) while sending me the cookie?
For example let's say a visitor originally requests the URL www.nowhere123.com/contact.html (which internally calls my generating script to set a cookie and create contact.html).
Let's say the page is cached.
Now let's say that the visitor comes back another day and requests the same URL again.
The cached content of the page (now static in the cache) will be sent to the visitor from the cache. The cookie will be sent back to the server attached to a new HTTP URL (www.nowhere123.com/contact.html) request.
My generation script will be activated, generating a new cookie and a new page.
Will the new page overwrite the page the visitor is seeing from the cache? On their browser? Will my new cookie be sent through the cache mechanism to the visitor while my new page content will be dropped by the cache?
I just don't get it...yet.
It would seem that none of my script generated pages which set cookies will be cacheable. Since cookie use will cause the page to be re-generated on every cookie returned through the original URL.
Do I have this right?
Any further clarification would be appreciated.