HTTP caching, browser weirdness, and everything else!
Yesterday I tried to get serious about properly caching some PHP pages (think "Articles with comments"). Big failure.
Long story short: I set the ETag header, set Last-Modified, and check the server side of every article browser request with them to see if I can post 304 back.
The problem is simple: the browser (tested with FF 3 so far), after 1 or 2 reloads, suddendly stops checking the page freshness and uses its cached copy.
For what I understood using ETag and Last-Modified, the browser MUST check with the server on every request (otherwise, why bother using ETag at all?).
I've also tried playing with Cache-Control or Expires ... nothing. One way or another, the browser stops checking or doesn't send back the ETag ...
I'm really upset ... did anyone accidentally figure this out?
source to share