Hello,
What settings are enabled in Browser Cache? More specifically Media & Other Files sub-box.
Hi Marko
The settings we have are all boxes checked in Browser Caching with the below as well
Expires header lifetime: 31536000
Cache Control policy: Cache with max-age ("public, max-age=EXPIRES_SECONDS")
The thing is we’ve used W3TC for years so we know our settings, plus we run our own dedicated server. Its just this one WordPress install that browser caching is failing.
Thanks
Chris
Hello,
You use Plesk control panel and nginx server handles images.
There is a configuration when your frontend server is nginx and handles all static assets, while PHP requests are handled by Apache. In that case, w3tc can’t know about your frontend server and generates rules for Apache, but it never handles images.
In that case, you need to add expires headers rules in your nginx config manually.
Check if that’s your case.
Hi Marko
Yes sorry that was a complete oversight, all now going through Apache, i had Smart static files processing still selected in NGINX, but still the problem remains.
All lighthouse reports say I need to Serve static assets with an efficient cache policy, cache TTL is listed as none on all PNG, GIF and JPEG files?
Thanks
Chris
Hi Marko
After some experimenting, Its clear its not a W3TC issue, I’ve added browser caching directly into my .htaccess file, turned off the W3TC browser caching and still not registering in Lighthouse.
I have EXACTLY the same caching setup on the same server on a different wordpress install and browser caching is recognised.
Turns out the .htaccess wasn’t being read by Apache due to a conf file error in PLESK