

My ETag can be the SHA1 hash of a static resource (e.g. If I'm pulling a list of products out of a database, the server can send the last rowversion as an ETag, rather than a date: 200 OK What is ETag?ĮTag is similar to Last-Modified, except that it doesn't have to be a date - it just has to be a something. 1998) equivalent of the modern Cache-Control: max-age header:Īnd if both are specified, then the browser uses max-age: 200 OKĪny web-site written after 1998 should not use Expires anymore, and instead use max-age. The difference between "Cache-Control: max-age" and "Expires"Įxpires is a legacy (c. if you specified max-age, the browser won't even have to suffer the network round-trip the content will come right out of the caches.


It will ask the server for the file, but instruct the server to only send the file if it has been modified since 6 3:13:38: GET / HTTP/1.1 they forgot to include E-Tag (so the browser can do a conditional request)īut they did include a Last-Modified date in the response: Last-Modified: Tue, 03:13:38 GMTīecause the browser knows the date the file was modified, it can perform a conditional request.they forgot to include Max-Age (so the browser knows how long the cached item is good for).they forgot to include Expires (so the browser knows to use the cached copy until that date).only on your own local machine):īut the server forgot to include any sort of caching hints: the item should only be cached in a private cache, i.e. The server kindly asked any intermediate proxies to not cache the contents (i.e. To answer your question about why caching is working, even though the web-server didn't include the headers:
