0

I have a url that I'd like to cache (forever per se) but I'd also like to have the browser re-validate it everytime. I don't know if it's possible, something either like Last-Modified (see below) or if the size is different.

I'm just trying to find out how/what "sets" the Last-Modified response header. I did a test example for "max-age=86400" and I have an image showing:

Cache-Control:max-age=86400, public
Date:Fri, 29 Jan 2016 04:21:31 GMT
Expires:Fri, 29 Jan 2016 04:21:32 GMT
Last-Modified:Fri, 29 Jan 2016 03:59:25 GMT

Yet the browser is still caching it, and that's fine as I would expect that, but my problem (and question) is about the Last-Modified part. For one, the image is a different size and it was modified since 03:59:25, so I'm expecting the browser to re-check if the file was changed or if it should serve the cached image. if I 'stat' the file at the terminal the Modify time is not 03:59 anymore, so I'm curious if that Last-Modified time is because that's when it was "Last-Modified" when my browser cached it?

Castaglia
  • 2,972
  • 5
  • 28
  • 49
alturic
  • 53
  • 2
  • 8
  • Possible duplicate of [Ideal HTTP cache control headers for different types of resources](http://stackoverflow.com/questions/2970938/ideal-http-cache-control-headers-for-different-types-of-resources) – Joe Feb 02 '16 at 12:20
  • Nope, not a duplicate. – alturic Feb 03 '16 at 13:22
  • See 2) ("They can be cached, but probably need a round-trip to be revalidated every time."); that's what you're asking for here in the title of your question. – Joe Feb 04 '16 at 09:23

0 Answers0