Image Image Image Image Image
Scroll to Top

To Top

Information Resources

Disabling Caching with .htaccess

October 23, 2012 - Information Resources
Suppressing Browser Caching with .htaccess

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"

This little trick, courtesy of AskApache, here:

Tags | , , , , , , , , ,