$_COOKIE['_lscache_vary'] device:mobile
$_COOKIE['_lscache_vary'] device:tablet
### LITESPEED_CACHE_START - Do not remove this line
<IfModule LiteSpeed>
CacheLookup on
## Uncomment the following directives if you has a separate mobile view
RewriteEngine On
## no webp support for Safari begin
RewriteCond %{HTTP_USER_AGENT} "Windows" [NC]
RewriteRule .* - [E=Cache-Control:vary=isdesktop]
RewriteCond %{HTTP_USER_AGENT} "Android" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(bot|insights|lighthouse)" [NC]
RewriteCond %{HTTP_USER_AGENT} "mobile" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(dpi)" [NC]
RewriteRule .* - [E=Cache-Control:vary=ismobile]
RewriteCond %{HTTP_USER_AGENT} "Android" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(bot|insights|lighthouse)" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(mobile)" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "dpi" [NC]
RewriteRule .* - [E=Cache-Control:vary=istabletandroid]
RewriteCond %{HTTP_USER_AGENT} "ipad" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(bot|insights|lighthouse)" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=isipad]
RewriteCond %{HTTP_USER_AGENT} "ipad" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(bot|insights|lighthouse)" [NC]
RewriteCond %{HTTP_USER_AGENT} "(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=isipadchrome]
RewriteCond %{HTTP_USER_AGENT} "iphone" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(bot|insights|lighthouse)" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=isiphone]
RewriteCond %{HTTP_USER_AGENT} "iphone" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(bot|insights|lighthouse)" [NC]
RewriteCond %{HTTP_USER_AGENT} "(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=isiphonechrome]
RewriteCond %{HTTP_USER_AGENT} "insights|lighthouse" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(mobile)" [NC]
RewriteRule .* - [E=Cache-Control:vary=ispagespeeddesktop]
RewriteCond %{HTTP_USER_AGENT} "insights|lighthouse" [NC]
RewriteCond %{HTTP_USER_AGENT} "mobile" [NC]
RewriteRule .* - [E=Cache-Control:vary=ispagespeedmobile]
RewriteCond %{HTTP_USER_AGENT} "macintosh" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(bot|insights|lighthouse)" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=ismacintosh]
RewriteCond %{HTTP_USER_AGENT} "macintosh" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(bot|insights|lighthouse)" [NC]
RewriteCond %{HTTP_USER_AGENT} "(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=ismacintoshchrome]
RewriteCond %{HTTP_USER_AGENT} "google" [NC]
RewriteCond %{HTTP_USER_AGENT} "bot|image" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(mobile)" [NC]
RewriteRule .* - [E=Cache-Control:isgooglebot]
RewriteCond %{HTTP_USER_AGENT} "google" [NC]
RewriteCond %{HTTP_USER_AGENT} "(bot|image)" [NC]
RewriteCond %{HTTP_USER_AGENT} "mobile" [NC]
RewriteRule .* - [E=Cache-Control:isgooglebotmobile]
RewriteCond %{HTTP_USER_AGENT} "yandex" [NC]
RewriteCond %{HTTP_USER_AGENT} "(bot|image)" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(mobile)" [NC]
RewriteRule .* - [E=Cache-Control:isyandexbot]
RewriteCond %{HTTP_USER_AGENT} "yandex" [NC]
RewriteCond %{HTTP_USER_AGENT} "(bot|image)" [NC]
RewriteCond %{HTTP_USER_AGENT} "mobile" [NC]
RewriteRule .* - [E=Cache-Control:isyandexbotmobile]
RewriteCond %{HTTP_USER_AGENT} "bing" [NC]
RewriteCond %{HTTP_USER_AGENT} "(bot|image)" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(mobile)" [NC]
RewriteRule .* - [E=Cache-Control:isbingbot]
RewriteCond %{HTTP_USER_AGENT} "bing" [NC]
RewriteCond %{HTTP_USER_AGENT} "(bot|image)" [NC]
RewriteCond %{HTTP_USER_AGENT} "mobile" [NC]
RewriteRule .* - [E=Cache-Control:isbingbotmobile]
RewriteCond %{HTTP_USER_AGENT} "(facebook|favicon)" [NC]
RewriteRule .* - [E=Cache-Control:isbots]
RewriteCond %{HTTP_USER_AGENT} "cfnetwork" [NC]
RewriteRule .* - [E=Cache-Control:iscfnetworkbot]
## no webp support for Safari end
</IfModule>
### LITESPEED_CACHE_END
$_SERVER['LSCACHE_VARY_VALUE'] isdesktop
$_SERVER['LS_CACHE_CTRL'] vary=isdesktop
RewriteCond %{HTTP_USER_AGENT} "Windows" [NC]
RewriteRule .* - [E=Cache-Control:vary=isdesktopwindows]
RewriteCond %{HTTP_USER_AGENT} "Android" [NC]
RewriteCond %{HTTP_USER_AGENT} "mobile" [NC]
RewriteRule .* - [E=Cache-Control:vary=ismobilephoneandroid]
RewriteCond %{HTTP_USER_AGENT} "Android" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(mobile)" [NC]
RewriteRule .* - [E=Cache-Control:vary=istabletandroid]
RewriteCond %{HTTP_USER_AGENT} "ipad" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=isipadsafari]
RewriteCond %{HTTP_USER_AGENT} "ipad" [NC]
RewriteCond %{HTTP_USER_AGENT} "(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=isipadchrome]
RewriteCond %{HTTP_USER_AGENT} "iphone" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=isiphone]
RewriteCond %{HTTP_USER_AGENT} "iphone" [NC]
RewriteCond %{HTTP_USER_AGENT} "(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=isiphonechrome]
RewriteCond %{HTTP_USER_AGENT} "macintosh" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=ismacintoshsafari]
RewriteCond %{HTTP_USER_AGENT} "macintosh" [NC]
RewriteCond %{HTTP_USER_AGENT} "(chrome|crios|opera|opt|firefox|fxios)" [NC]
RewriteRule .* - [E=Cache-Control:vary=ismacintoshchrome]
RewriteCond %{HTTP_USER_AGENT} "(googlebot|yandexbot| yandeximages|bingbot|cfnetwork|seznambot|favicon|facebook|ccbot|ru_bot|pinterestbot)" [NC]
RewriteCond %{HTTP_USER_AGENT} "!(chrome)" [NC]
RewriteRule .* - [E=Cache-Control:isdesktopbots]
RewriteCond %{HTTP_USER_AGENT} "(yandexbot)" [NC]
RewriteCond %{HTTP_USER_AGENT} "(chrome)" [NC]
RewriteRule .* - [E=Cache-Control:isbotswebp]