I run a website where the static content changes at least 4 times a week and I'm trying to figure out the best header arrangement to use.
Currently I have all caching related headers in use. I have cache-control set to must-revalidate with a super low max-age value (60 seconds max). I also have Etag header set to an encoded value of a timestamp that shows when the website is last updated. the Etag value is only changed when the website content is changed. I also have a last-modified header set to the equivalent value of what max-age is but in proper GMT date format. Here's an example of my headers:
HTTP/1.1 200 OK
Date: Tue, 17 Mar 2015 06:24:14 GMT
Server: Apache
Set-Cookie: PHPSESSID=f7cf7d0171b7a7cba54aaddc90c7eabd; path=/;
Vary: Accept-Encoding
ETag: "d06a8d9a82809e0f35669ce1fb80dca3"
Last-Modified: Tue, 17 Mar 2015 04:34:52 GMT
Cache-control: max-age: 5,must-revalidate
Expires: Tue, 17 Mar 2015 06:25:14 GMT
Connection: keep-alive
Content-Length: 22583
Content-Type: text/html; charset=UTF-8
So I'm curious as to what the best way is to cache a site that changes anywhere between 3x a week (when new content is added) and 5x a day (when website is being repaired). At first I think remove the cache-control line entirely but I don't know how proxies will appreciate that, and my current setup right now is contributing to my score of F at webpagetest.org for caching content.
What would you suggest the best header arrangement I should have or should I leave as-is? Any ideas?