Image Image Image Image Image
Scroll to Top

To Top

browser

23

Oct
2012

Information Resources

Permalink

By admin404

Disabling Caching with .htaccess

October 23, 2012 - Information Resources

For our friends and fellow designers who would rather not have to perpetually clear browser cache while fine-tuning CSS, Actionscript, ads or procedural images, you might want to have a look at the following apache/.htaccess directive:

<filesMatch "\.(html|htm|js|css)$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</filesMatch>

This little trick, courtesy of AskApache, here:
http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html

Tags | .htaccess, apache, browser, caching, clear, conf, disable, httpd, perpetual, persistent