Cache activation issue

#1
Hello,

I am on CPanel in shared hosting, I try to activate the cache on my site but the htaccess configuration nothing changes, I would need help. (I am on a html site)

Here is my htaccess :
Code:
<IfModule LiteSpeed>
RewriteEngine On
RewriteRule .* - [E=Cache-Control:max-age=31536000]
</IfModule>
On the Google developer console:
I have
Code:
x-turbo-charged-by: LiteSpeed

And I especially::
Code:
cache-control: max-age=0

And at some point I have her:
Code:
cache-control: no-cache
I can't activate the cache at all, could someone help me?
 

serpent_driver

Well-Known Member
#2
If you are really on a .html site, Litespeed cache supports only dynamic generated pages like PHP but not static html pages. These headers are not Litespeed cache headers.
 
#3
So I would have to delete LiteSpeed and switch to something more basic then? (Like Apache)

Because currently I have no cache is it necessarily impacts the website
 
#5
I know that LiteSpeed is better than the others everyone tells me, I am not saying LiteSpeed is basic, as you told me that you cannot put cache on static content I have to look for other cache solution.
 

serpent_driver

Well-Known Member
#6
Again, to get benefits of a cache you need dynamic generated content, not static. This is a condition of every HTTP cache, not only Litespeed. On your side I would check if Litespeed cache is available at your host. Generate a empty.php file and request it in browser. If you can see "x-litespeed-cache: hit/miss" header in browser dev console you can use Litespeed cache, but only with dynamic generated content. Or use Wordpress if you need a CMS. For WP there is a Litespeed cache plugin available.
 
#7
Yes I do have "x-litespeed-cache: hit" when I am on a php page. The problem is I can't just change the cache of the images, before on apache I did an htaccess with a mod_expire and the images were cached and I could choose the cache time now I can't do that anymore that's the problem
 
Top