general rule - GET = cache

2007-11-12 @ 19:01#

i've been talking about this quite a bit lately with folks and want to go on record right here and now:

If you're servicing an HTTP GET request, mark it cache-able. Use expiration, validation, or both - but mark them cache-able!

that means non-cached GET is the exception. is it secure? or totally transient (please not that!)? ok, then don't mark it cache-able.

another thing, stop using POST to return content to the caller. if you must use POST to pass args and set something on the server, use HTTP 3xx responses to redirect the browser to a GET (that will be cache-able) instead.

there, nuff said.

code