Hi
I have a status site with static pages and images where I want to disable cache and set expire to 0.
I tried with htaccess:
tried with headers in / context:
These are html header:
There are images header:
I have a status site with static pages and images where I want to disable cache and set expire to 0.
I tried with htaccess:
Code:
<IfModule litespeed>
RewriteEngine On
RewriteRule .* - [E=Cache-Control:no-cache]
</IfModule>
<IfModule mod_headers.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule>
<IfModule mod_expires.c>
ExpiresActive Off
</IfModule>
<FilesMatch "\.(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|png|pdf|swf|txt)$">
<IfModule mod_expires.c>
ExpiresActive Off
</IfModule>
<IfModule mod_headers.c>
FileETag None
Header unset ETag
Header unset Pragma
Header unset Cache-Control
Header unset Last-Modified
Header set Pragma "no-cache"
Header set Cache-Control "max-age=0, no-cache, no-store, must-r$
Header set Expires "Mon, 10 Apr 1972 00:00:00 GMT"
</IfModule>
</FilesMatch>
Code:
Cache-Control "no-cache, no-store, must-revalidate"
Pragma "no-cache"
Expires 0
Code:
content-encoding: gzip
content-length: 591
content-type: text/html; charset=UTF-8
date: Sun, 22 Dec 2019 10:38:15 GMT
server: LiteSpeed
status: 200
vary: Accept-Encoding
Code:
cache-control: public, max-age=604800
content-length: 1114
content-type: image/png
date: Sun, 22 Dec 2019 10:32:09 GMT
etag: "45a-5dfdf5c6-160269;;;"
expires: Sun, 29 Dec 2019 10:32:09 GMT
last-modified: Sat, 21 Dec 2019 10:36:54 GMT
server: LiteSpeed
status: 200