Skip to content

Instantly share code, notes, and snippets.

@knolaust
Last active January 30, 2024 14:52
Show Gist options
  • Save knolaust/656a1fb5be4edc688bdbf3d87fc8e0fa to your computer and use it in GitHub Desktop.
Save knolaust/656a1fb5be4edc688bdbf3d87fc8e0fa to your computer and use it in GitHub Desktop.
SiteGround anti-cache for directory — place in .htaccess within directory and SiteGround won't cache.
# Begin SiteGround Anti-Cache Configuration for Directory
# Author: Knol Aust
# Gist Keywords: siteground, caching, htaccess, performance
# This configuration is intended for use within a specific directory on a SiteGround-hosted website.
# Placing this .htaccess file in a directory will instruct SiteGround's caching mechanisms
# not to cache any content from this directory. This can be particularly useful for directories
# containing dynamic or frequently updated content, where caching might lead to stale content being served.
<IfModule mod_headers.c>
Header set Cache-Control "private"
</IfModule>
# End SiteGround Anti-Cache Configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment