views:

18

answers:

0

I have an image that is server properly with the 200 code the first time round. Let's say I modify its timestamp, so the Etag changes as well (same result with changing the image size). The image is not invalidated in the browser's cache if I try to navigate the web with simple clicks on anchors - I get a 304 response code until I explicitly refresh the page with F5 (tested in Firefox).

Can someone explain this? Does this have to do with the Last-Modified header? How to make sure the updated file is served whenever it changes on the server?

From the HTTP responses, everything seems OK.

1st: the 200 response

Date Tue, 14 Sep 2010 11:37:00 GMT
Server Apache/2.2.3 (CentOS)
Last-Modified Tue, 14 Sep 2010 11:36:53 GMT
Etag "7fe25-1b975-49036840e3540"
Accept-Ranges bytes
Content-Length 113013
Keep-Alive timeout=15, max=196
Connection Keep-Alive
Content-Type image/jpeg

2nd: the 304 response

Date Tue, 14 Sep 2010 11:38:21 GMT
Server Apache/2.2.3 (CentOS)
Last-Modified Tue, 14 Sep 2010 11:36:53 GMT
Etag "7fe25-1b975-49036840e3540"
Accept-Ranges bytes
Content-Length 113013
Content-Type image/jpeg