openlitespeed cache without plugin not work

LiteCache

Active Member
#25
Try this:

Code:
<IfModule litespeed>
CacheLookup on
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/admin/ [NC]
RewriteRule .* - [E=Cache-Control:no-cache]

RewriteCond %{HTTP_COOKIE} set_cookie_login_name [NC]
RewriteRule .* - [E=cache-control::private,max-age=120]

RewriteRule .* - [E=cache-control:max-age=120]
</IfModule>
 
#26
something I don't understand at the Chrome browser chat script is working without a problem
but Firefox cached the page and never changed it even if you click the country flag at the top right of the page must content change to your language
 

LiteCache

Active Member
#27
Please post cache-control (not x-litespeed-cache-control) settings.

If you offer different languages you need a language cookie with different values depending on selected language. Then you can define a cache vary depending on cookie value.
 

LiteCache

Active Member
#31
Code:
<IfModule litespeed>
CacheLookup on
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/admin/ [NC]
RewriteRule .* - [E=Cache-Control:no-cache]

RewriteRule .* - [E=cache-control:max-age=120]

RewriteCond %{HTTP_COOKIE} set_cookie_login_name [NC]
RewriteRule .* - [E=cache-control::private,max-age=120]

#In order for the cache vary to work, the language cookie must be set.
RewriteCond %{HTTP_COOKIE} ^bc_lang  [NC]
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+lang]
</IfModule>
 

LiteCache

Active Member
#37
The code for the .htaccess is logically correct and meets all the necessary requirements. However, I don't know the PHP code of your site, so it may well be that you either have to change or add something. This primarily concerns that the cookies are set correctly.
 
#38
but before I temporarily disable the CDN

I set these rewrite rules, and I found there was no problem until now.

<IfModule litespeed>
CacheLookup on
RewriteEngine On
RewriteCond %{REQUEST_URI} !/login.php [NC]
RewriteRule .* - [E=cache-control:max-age=120]
</IfModule>

Could you check? if you have the same result so try clicking on a country flag icon at the top right of my site
https://www.arabchat.mobi
 

LiteCache

Active Member
#39
You need private cache for logged-in users. This is important, otherwise you will get new issues. Not logged-in users will see cached content from logged-in users, you understand?
 
#40
You need a private cache for logged-in users. This is important, otherwise, you will get new issues. Not logged-in users will see cached content from logged-in users, you understand?
yes I disable the public cache at all from the OLS cache module because my site it's about users' login page only
 
Top