Reputation: 105439
What value should have cache-control header to enable ETag\Last-Modified? I want my resources files to be cached but never used without validation from server, i.e. browser should send If-none-match or If-modified-since header and receive 304 HTTP status code to use file from cache.
Upvotes: 2
Views: 227
Reputation: 1694
The short answer is Cache-control: no-cache
. Browser/caching proxy will have to always validate data before serving. For success validation ETag
and Last-Modified
headers must be present. Otherwise resource will be downloaded always fully from the server.
Upvotes: 2