Skip to content

Instantly share code, notes, and snippets.

@davidpede
Last active February 5, 2025 16:41
Show Gist options
  • Save davidpede/94ece50f242a64ce4e1c308498fe4723 to your computer and use it in GitHub Desktop.
Save davidpede/94ece50f242a64ce4e1c308498fe4723 to your computer and use it in GitHub Desktop.
Disable caching using .htaccess
<IfModule mod_headers.c>
# Disable caching by sending no-cache headers
Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
Header set Pragma "no-cache" # Adds compatibility for older HTTP 1.0 caches
Header set Expires 0
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment