:: shuffling papers ::
Apache [httpd.apache.org] says ominously
When the Expires header is already part of the response generated by the server, for example when generated by a CGI script or proxied from an origin server, this module does not change or add an Expires or Cache-Control header.
I think this means you could beat your brains out for weeks and never get it to work the way you want, if there is other stuff going on that's beyond your control.
What do you mean by "manually change modification time"? Changing the variable part, like from 1 week to 2 days? Or re-uploading an unchanged file so it looks as if it has been changed?
As I understand it, the browser
always looks at the header. So if someone visited yesterday and met a header that said "good for another five days", their browser will still check the header tomorrow; they won't just ignore it for those five days. And of course the user is always free to refresh manually-- and if they empty their cache, it doesn't matter if you just modified the file three minutes ago. It will get loaded up again. Conversely, if the ISP uses remote caching, they may or may not pay attention to what your header says.
Note that if you use a modification date based setting, the Expires header will not be added to content that does not come from a file on disk. This is due to the fact that there is no modification time for such content.
Well, you don't have any dynamically created images do you? ;) Modification sure seems like what you're looking for.
ExpiresByType image/gif "modification plus 5 hours 3 minutes"
(says Apache, but they're just showing off)
If cached, the document may be fetched from the cache rather than from the source until this time has passed. After that, the cache copy is considered "expired" and invalid, and a new copy must be obtained from the source.
Sorry, but I just love those "mays" and "musts". On one hand they're giving permission; on the other hand they're saying you gotta... or else. Uhm. Or else what? :)