doh! set-cookie = cache-control:private

2007-08-13 @ 17:04#

i'm such a dense old man...

i spent time this week devouring duane wessels' excellent book, Web Caching (see my earlier post), and started pfutzing with my exyus framework to better handle cookie-d requests vis-a-vis public caches. i was all about marking them as non-cacheable; making sure no other caching messages dripped out that would lead the caching server to *surmise* the request was cacheable; altering my code logic to know *when* to do all this funky dance and it was still bugging me.

then, this afternoon, it hit me like a hammer on the top of my head:

Cache-Control:private

Doh!

of course! if you have a cookie for some client, you can just tell everyone only the *client* can cache the request. all the other caching info is cool (max-age, expires, last-modified, etags, must-revalidate, etc.). is that so hard? no. and now i think my code dance will be much simpler, too. i need to undo some work from yesterday and re-factor things in general. but i can see the light.

i feel a lot better.

code