Either you or any other plugin has added this wrong browser caching setting, but there is no function in cache plugin you can use to remove this code. This must be done manually, but check your installed plugins that can caused it.
Plugin Support
qtwrk
(@qtwrk)
disable LiteSpeed plugin , backup your current .htaccess, then edit it and remove all the lines that starts like ExpiresDefault and ExpiresByType directives
then enable back the plugin.
Thread Starter
MisterH
(@hmarksthespot)
Thanks, I will try your solution @qtwrk – we had the W3 Total Cache before the upgrade, and that plugin was removed properly, but maybe it left some thing back in the .htaccess.
Thread Starter
MisterH
(@hmarksthespot)
Expire and Cache-Control headers are Must Have Basics for ergonomic handling of caching for static sources, hence it is not recommended to remove them. As if you remove Expire headers it will not prevent that users see old images, because there is a more important cache header: the “Cache-Control” header is responsible for how long images and other static sources are cached in the browser.
You can just change the Time To Live how long images are cached in the browser, but if you decrease this time you will get a bad Pagespeed score because Pagespeed expects 1 year or 31536000 seconds.
Hence these “Expires” has nothing to do with the LiteSpeed cache. It’s an Apache directive that controls cache behavior for static sources like images. Expires Directive controls the overall time to live for static sources and you should leave it.
So upon asking my hosting provider, this is what they are saying. Essentially I dont have to worry about it and I could alter the Time to Live or such, whats the official LS Cache take on it or those with any similar experience?
-
This reply was modified 3 years ago by
MisterH.
In principle, everything your hosting provider writes is correct, but it is about which Expire setting is the right setting and not about which setting must be present. Above all, your provider may not specify any settings. Your provider interferes with his server-side settings in something he can have no knowledge of. A hosting provider can take care of hosting, but may not apply default settings without having the necessary knowledge to do so. In concrete cases, he specifies settings for which he lacks the necessary knowledge. This causes your WordPress installation to get the wrong settings.
Thread Starter
MisterH
(@hmarksthespot)
Thank you, So it is a managed VPS. What this boils down to is, what would be the solution and would LS Cache team be willing to look into it?
The solution is that your provider should not interfere with settings. Providing directives is the most he has to take care of.
Thread Starter
MisterH
(@hmarksthespot)
Okay, so what would you like the provider to do exactly? leave it blank, do some settings on their side? Its not clear for me at least. I am trying to resolve this and not a person with enough technical knowledge in this matter hence, I am having to ask. So thank you.
As I said before, he should not specify any settings. That is not his job.
Thread Starter
MisterH
(@hmarksthespot)
@qtwrk Would be nice to also receive any comments from the LS Cache Plugin support team on their thoughts. Thanks
Plugin Support
qtwrk
(@qtwrk)
please forgive my bluntness, but what is the issue now ?
for that expire thing , follow my advice ought do it , clean up all other directives and let LSCWP handles it
-
This reply was modified 3 years ago by
qtwrk.
Thread Starter
MisterH
(@hmarksthespot)
@qtwrk no problem, not blunt at all. The issue is I would like you to tell me what I am told by (you can see from earlier in this post) as the plugin support, is your official stance still the same, I should clean up those two directives as it was on your first post. Although the host says, otherwise?
Plugin Support
qtwrk
(@qtwrk)
expire and cache-control are 2 different headers but for same purpose , to indicate the browser to cache certain resources (usually static ones like image, js, css, fonts …etc) for certain period of time
the plugin will create expire header directive for you , to the htaccess
the warning you received , was due to something else has added the same or similar directive before/already , so it gives you a warning to avoid any possible conflict
so I suggested to clean up the expire directive added by something else and let LSCWP adds it
or , you can just ignore the message and yourself to manually handle the expire or cache-control directive for browser caching.