Hi there,
When you go to WP-Optimize > Cache > Static file headers, what is there?
This is where WP-Optimize enables you to turn on browser caching, when the server runs on Apache.
Though looking at your site, it seems to be running on Nginx.
Unfortunately, Nginx does not offer a solution like Apache’s .htaccess. Which means that browser caching has to be configured on the server.
If the relevant setting in WP-Optimize doesn’t allow you to enable browser caching, I’d encourage you to check with your hosting.
Marc.
When you go to WP-Optimize > Cache > Static file headers, what is there?
This is what I see: screen shot
Though looking at your site, it seems to be running on Nginx.
I have no idea what that is or if my site uses it. I do have an .htaccess file on the server, which does use Apache.
When I look at the cPanel, there is an option for Apache, so I’m sure the server uses Apache, not Nginx. I have, however, asked the host via a ticket.
Here’s a screen shot of the Apache handlers section which seems to indicate that it is an Apache server.
-
This reply was modified 6 years ago by
jrothra.
Okay, then maybe a “reverse proxy” is used (which means that both Nginx and Apache are used together), because the headers on your site indicate Nginx.
In that case, and if your hosting doesn’t have more info, you might have to manually edit the .htaccess.
Here’s the section that WP-Optimize would add:
# BEGIN WP-Optimize Browser Cache
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/webp "access 1 month"
ExpiresByType image/x-icon "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresDefault "access 1 month"
</IfModule>
<IfModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|webp|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</IfModule>
#Disable ETag
FileETag None
# END WP-Optimize Browser Cache
So you can manually add this in your .htaccess.
Hmm… odd, but probably only to me since this is a bit above my head right now.
I added the info to .htaccess (which I accessed via Yoast > Tools).
After adding that code to the .htaccess file, I re-ran speed tests. Both Pingdom and GTMetrics/YSlow continue to say I need to “add expires headers.” I thought that this code was doing that.
Your screenshots aren’t public, so I ran a test on gtmetrix.
I get B, and F on Yslow.
Though looking at the assets listed, they’re all external URLs. This means that the settings on your website do work (otherwise you would find your own website’s assets).
Those resources (and their browser caching settings) are out of your control, as they’re served by third party websites.

So unfortunately, there isn’t much you can do about that.
Marc.
I talked to the web hosting company and they said that the plugin should have been able to write to the .htaccess file, and that it’s odd that it didn’t.
My thoughts: since I manually added the info, that works, too.