Tell browsers to cache until last modified date changes?

Posted by Chad Johnson on Server Fault See other posts from Server Fault or by Chad Johnson
Published on 2013-10-25T21:16:21Z Indexed on 2013/10/25 21:57 UTC
Read the original article Hit count: 248

My web site consists of static HTML files which are usually republished once per day, and sometimes more.

I'm using Apache. In the vhost settings for my site, I'd like to tell browsers to cache HTML files indefinitely, until Apache sees that they are modified. So as soon as an HTML file is changed, Apache should immediately begin telling browsers it's changed and send the updated file. As soon as a new file is published, browsers should immediately begin receiving that...they should never receive old versions of files. Maybe

ExpiresByType text/html modification

and no "plus x days."

Is something like this possible?

© Server Fault or respective owner

Related posts about apache2

Related posts about caching