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>

 

Hjälpte svaret dig? 0 användare blev hjälpta av detta svar (0 Antal röster)