Updated: 28 September 2026 · Applies to: Apache 2.4 (.htaccess)
To stop browsers and proxies from caching certain pages (for example during development, or for pages with changing data), send no-cache headers.
.htaccess (Apache)
<Files "index.php">
FileETag None
<IfModule mod_headers.c>
Header unset ETag
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule>
</Files>
Note: Turning off caching for a whole site makes it slower and increases load. Limit it to the pages that need it. If your site uses a CDN or server cache, clear that as well.