0
votes

If a web server returns the HTTP response without any caching headers (e.g. Pragma and Cache-Control, ETag or Last-Modified), is a standards-conforming HTTP proxy allowed to cache the page and return the cached version (without consulting the web server) if the web browser requests the same URL again?

I'm interested for HTTP/1.0 and HTTP/1.1.

I was reading https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.4, and I think the answer is yes (the proxy is allowed to cache the page and return the cached version by default). Did I understand it correctly?

1

1 Answers

1
votes

The answer is yes. There's a concept in http called heuristic freshness, which allows a cache to calculate an estimated age of a resource, and then choose an arbitrary proportion of that value to use as a freshness lifetime, during which it can serve the cached content to clients.

There are some restrictions, for example it's not supposed to do this if there's a query string in the request, or (if my memory serves me) if the response lacks a Date header.