Wordpress LScache Plugin: Browser cache not working
Last Updated on: Wed, 15 Apr 2026 00:00:02 I have enabled the browser cache setting. However I notice that the generated minified files that are served by /min/generatedfile.css are not sending cache control header. I have also noticed that html is not gzipped. Can you help me? Thanks The page I need help with: https://www.prestitiinpdap.it hmmmmmm, could you disable all other plugins to try ? I just installed a WP 4.8.4 with LSCWP 1.8.3 , all min/ .css are properly set cache header Hello, First of all i do not see litespeed cache to hit. Please check plugin settings and server settings. I was digging in the documentation and just discoverede that openlitespeed does not support htaccess. Is this correct? If so, I should add all the htaccess content on rewrite section of admin panel? Mmm?Ive solved the htaccess problem by adding rewriteFile /usr/local/lsws/prestitiinpdap.it/html/.htaccess in rewrite section. Now X-LiteSpeed-Cache: hit is correctly sent. The question now is: Should I add Header set Cache-Control max-age=31536000, public to my files? Or is it suppesed to be handled by litespeed cache? Heres my htaccess file: # BEGIN LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## RewriteEngine on CacheLookup on RewriteRule . - [E=Cache-Control:no-autoflush] RewriteRule min/ w+ .(css|js) - [E=cache-control:no-vary] ### marker CACHE RESOURCE start ### RewriteRule LSCWP_CONTENT_FOLDER/. /[^/] (responsive|css|js|dynamic|loader|fonts) .php - [E=cache-control:max-age=3600] ### marker CACHE RESOURCE end ### ### marker LOGIN COOKIE start ### RewriteRule .? - [E=Cache-Vary:wp-postpass_6f658d45f2699b4444b0184733ddbf4b ] ### marker LOGIN COOKIE end ### ### marker FAVICON start ### RewriteRule favicon .ico$ - [E=cache-control:max-age=86400] ### marker FAVICON end ### ### marker BROWSER CACHE start ### ExpiresActive on ExpiresByType application/pdf A2592000 ExpiresByType image/x-icon A2592000 ExpiresByType image/vnd.microsoft.icon A2592000 ExpiresByType image/svg+xml A2592000 ExpiresByType image/jpg A2592000 ExpiresByType image/jpeg A2592000 ExpiresByType image/png A2592000 ExpiresByType image/gif A2592000 ExpiresByType image/webp A2592000 ExpiresByType video/ogg A2592000 ExpiresByType audio/ogg A2592000 ExpiresByType video/mp4 A2592000 ExpiresByType video/webm A2592000 ExpiresByType text/css A2592000 ExpiresByType text/javascript A2592000 ExpiresByType application/javascript A2592000 ExpiresByType application/x-javascript A2592000 ExpiresByType application/x-font-ttf A2592000 ExpiresByType application/x-font-woff A2592000 ExpiresByType application/font-woff A2592000 ExpiresByType application/font-woff2 A2592000 ExpiresByType application/vnd.ms-fontobject A2592000 ExpiresByType font/ttf A2592000 ExpiresByType font/woff A2592000 ExpiresByType font/woff2 A2592000 ### marker BROWSER CACHE end ### ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END LSCACHE # BEGIN WordPress RewriteEngine On RewriteCond % HTTPS off # First rewrite to HTTPS: # Dont put www. here. If it is already there it will be included, if not # the subsequent rule will catch it. RewriteRule . https://% HTTP_HOST % REQUEST_URI [L,R=301] # Now, rewrite any request to the wrong domain to use www. # [NC] is a case-insensitive match RewriteCond % HTTP_HOST !^www . [NC] RewriteRule . https://www.% HTTP_HOST % REQUEST_URI [L,R=301] RewriteBase / RewriteRule ^index .php$ - [L] RewriteCond % REQUEST_FILENAME !-f RewriteCond % REQUEST_FILENAME !-d RewriteRule . /index.php [L] # END WordPressExpand And heres my cache module config: enableCache 0 enablePrivateCache 0 checkPublicCache 1 checkPrivateCache 1 qsCache 1 reqCookieCache 1 ignoreReqCacheCtrl 1 ignoreRespCacheCtrl 0 respCookieCache 1 expireInSeconds 3600 privateExpireInSeconds 3600 maxStaleAge 200 maxCacheObjSize 10000000 storagepath cachedata noCacheDomain noCacheUrl no-vary 0 addEtag 0 Expand Further informations: if you go on https://www.prestitiinpdap.it/mutui-inpdap/ you see that image have cache-control but its not hit by litespeed cache. However css and js doesnt have any expires header. Seems a bug on openlitespeed. Id like to have help on this. I can create a user and give access to check if its my misunderstanding of server settings or a serious bug. Hi, @tropicalista Thank you for all of the updates and details youve sent so far. Should I add Header set Cache-Control max-age=31536000, public to my files? Or is it suppesed to be handled by litespeed cache? Once you enable Browser Cache (at the bottom of LiteSpeed Cache > Settings > Cache), the headers will be taken care of for you. You dont need to do anything else. Further informations: if you go on https://www.prestitiinpdap.it/mutui-inpdap/ you see that image have cache-control but its not hit by litespeed cache. I visited the link and I do see x-litespeed-cache:hit. If you dont, its possible you are logged in and you have Cache Logged-In Users set to OFF. Try viewing your page from an incognito window and see if it behaves the way you would like it to behave. Let us know if things are still not right from the incognito window, and what, specifically, is still not working. I just noticed youre getting some help in our main forum, so Ill go ahead and close this post to avoid duplicate effort.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference