What'll happen if I set server response as:
Cache-Control: private,no-cache,max-age=900
?
What'll happen if the header is like:
Cache-Control: public,no-cache,max-age=900
?
Since it has a no-cache
whether browser (Or proxy server) consider the max-age
?
As stated in the RFC documents:
As a result, if
no-cache
has been defined in a server's response, this means that the browser (and any intermediary caches) will "revalidate" on every request (aka make a request to the origin server and return its response, instead of using any cached content).So, to clearly answer your question:
No, the browser will not consider the
max-age
(given that the browser can handle theno-cache
directive, since this might not recognized by some HTTP 1.0 browsers/caches).