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?