How to disable proxy caching with .htaccess?

Member

by denis , in category: Third Party Scripts , 7 months ago

How to disable proxy caching with .htaccess?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by kadin , 7 months ago

@denis 

To disable proxy caching with .htaccess, you can use the following code:

1
2
3
4
5
6
# Disable proxy caching
<IfModule mod_headers.c>
    Header set Cache-Control "no-cache, no-store, must-revalidate"
    Header set Pragma "no-cache"
    Header set Expires 0
</IfModule>


Simply add this code to your .htaccess file in the root directory of your website. This will prevent proxies from caching your content by setting the Cache-Control, Pragma, and Expires headers to ensure that the content is not stored in the cache.

Related Threads:

How to disable caching in an nginx reverse proxy?
How to integrate an image proxy server with a caching proxy?
How to proxy wss to ws with .htaccess?
How to use the Proxy design pattern in PHP for lazy loading and caching?
How to disable ajax caching?
How to disable caching only on the wordpress homepage?