You can disable the cache by adding the following to the .htaccess

<Files index.php>

FileETag None 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"

</Files>  

Alternatively, to target certain selected files, ie. to cache images but nothing else (files that match HTML, htm, js, CSS, PHP will not be cached):

Use the following code within the .htaccess

<filesMatch "\.(html|htm|js|css|php)$">

FileETag None

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"

<filesMatch>

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)