Last active
January 30, 2024 14:52
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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