Wordpress LScache Plugin: Guarantee that text/html is not cached client side
Last Updated on: Wed, 15 Apr 2026 00:00:02 I have a wordpress site, running fine and fast on openlitespeed. I saw that ExpiresByType should be set in server config as htaccess expires by type is not honoured in the opensource version of litespeed. While I was investigating this I saw that the headers sent for the doc (text/html) objects did not have any stuff in them about caching set. I do not want html to be cached and I am thinking about using a cdn so this issue of mine should be fixed before that step. Is having only the header x-litespeed-cache: hit enough and guarantees that no client caching takes place? I thought about it and tried to add cache-control: no-cache for the text/html objects but could not find a place to add it. So I resorted to adding one more expireByType for text/html=A0 but I am not sure. What are your thoughs about this? Can I add (I tried with FilesMatch but didnt work) cache-control: no-cache, must-revalidate to all wordpress pages/posts and keep the caching only for static stuff (css,js,fonts,images)? If yes, where should I put it? To be more precise the headers a client receives for a text/html object are (when no expiresbytype for text/html is present: content-encoding: gzip content-length: 18742 content-type: text/html charset=UTF-8 date: Tue, 30 Apr 2019 16:23:40 GMT link: rel=preload as=style, rel=preload as=script, rel=preload as=script, rel=preload as=script status: 200 vary: Accept-Encoding x-litespeed-cache: hit I believe these headers DO NOT guarantee that a client wont cache the response. Am I correct? And if I set ExpiresByType for text/html objects to text/html=A0, ... then the headers a client receives are cache-control: public, max-age=0 content-encoding: gzip content-length: 18354 content-type: text/html charset=UTF-8 date: Tue, 30 Apr 2019 17:09:03 GMT expires: Tue, 30 Apr 2019 17:08:45 GMT link: rel=preload as=style, rel=preload as=script, rel=preload as=script, rel=preload as=script status: 200 vary: Accept-Encoding x-litespeed-cache: hit But I believe max-age=0 is not enough. Is it? Thank you! This topic was modified 3 years, 7 months ago by synthelectric. The page I need help with: https://www.adek.gr Hi, May I know are these HTML the actual HTML ? not created by rewrite rule ? Because I am seeing x-litespeed-cache header which means it should be a PHP page. and by default , WP page isnt cached by browser , if you open dev tool you will see the main page is always requested to server. Best regards, Hello! Thank you for the reply. I understood that wordpress should send the headers and did this in the end. All is good. Thank you! Hi, Unfortunately, only WP moderator has ability to modify the topic. Best regards, Ok thank you! My pleasure
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference