If I don't specify public
or private
directive in the Cache-Control
header, what's the default behavior? Can it be cached by proxy servers or not?
Found an answer to this on webmasters.stackexchange.com. Quote:
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3:
The max-age directive on a response implies that the response is cacheable (i.e., "public") unless some other, more restrictive cache directive is also present.
It's conceivable (likely?) that there are proxies in the wild which break this but since the only failure mode could be treating a public resource as private the consequences should be minimal beyond a modest performance hit. You'll have far more problems with proxies which do things like cache resources far beyond your specified max-age.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With