Leverage Browser Caching (No effect in GTMetrix, GPST, or Pingdom)

HI,
Forgive me if someone has posted this before (almost positive they have and I just can’t find it).

I’ve had Comet Cache loaded on my site for six months. It does indeed speed up the site, but none of the three major site speed tests acknowledge that I have instituted any form of cache at all.

I’m an amateur, so I’m sorry if it’s a dumb question. Bear with me. Lol

Thanks so much!
R-

When you say that, are you referring to a score, or to a statement made on those sites, or to something else?

Hit Tim,
Not the scores specifically. All three sites give you a list of reason why you may have gotten a various score. All three are telling me to “Leverage Browser Caching”. See uploaded images from GT Metrix. Looks like I can only post one image at a time here, but GPS gives an identical message.

You need the Pro version of Comet Cache for that. Then go to Apache Optimizations and go through the various options there.

Purchased, downloaded, activated, and checked the source code to make sure that it was working.

Waited about an hour. Went back and retested on all three platforms and got the same results. Not sure what to do here?

Try testing a different page on your site.

Tested three different pages. Same results.

In that case, you’re going to have to post details of your site.

Hi Tim,
That’s fine. Not sure what details are needed, though.

The URL was what I needed.

The issue is that you have a ton of javascript files that are not being cached. I can see you’re running the Autoptimize plugin, but it’s not touching those files, and CC apparently isn’t “seeing” them either. This is also affecting your rating in other categories on the speed testing sites.

Now that you have the Pro version of Comet Cache, my advice would be to stop using Autoptimize, and let Comet Cache handle the compression of both CSS and javascript files. You’ll see the settings under HTML compression.

You can experiment to see what works best for you. But I can see that you are using http/2, so I’d advise choosing the options to compress, but NOT the options to combine.

Yeah, some of those are lead gen forms and whatnot that I can’t replace.

I killed Autooptimize and turned on the HTML compression settings through Commet Cache. That automatically bumped me up a notch. on both GPST and GT Metrix.

Google is still giving me a goose egg on “Leverage Browser Caching”, but if the site’s loading at 3 to 4 sec average, I don’t see an huge ongoing problem.

I have browser caching enabled as well, but google doesn’t seem to care…

https://developers.google.com/speed/pagespeed/insights/?hl=en&utm_source=wmx&utm_campaign=wmx_otherlinks&url=http%3A%2F%2Ftheglebe.com%2F

@Rion, @nathanaelphilip: I think the reason in both cases is your host.

I can see now that @Rion is using GoDaddy on a Microsoft IIS Server. That’s the worst of all possible worlds.

@nathanaelphilip is apparently using Colt. I have never heard of them before.

In both cases, I suggest you talk to your host. (Well, actually, @Rion, I suggest you change hosts.)

@KTS915 what should i be talking to them about? turning on mod_deflate?

Sure, but also talk more generally in case there’s something else going on too. So I’d tell them what you have enabled in Comet Cache (it explains them) and then ask why you aren’t seeing any benefit.

I’m seeing the same thing as the opening poster - I’ve purchased and installed the pro version of Comet Cache and enabled the “Leverage Browser Caching” switch, but Pagespeed reports that there is no Browser Cache Leveraging for the URLs on my site, e.g.

I’m using a Go Daddy registration on a Digital Ocean Apache server. Can anyone suggest the cause of this problem?

Thanks.

You are running Autoptimize. You need to clear its cache. In any event, you don’t need it with Comet Cache Pro because that comes with the capability to do HTML optimization (and it’s much less likely to cause problems too).

Thanks. I’ve deleted the Autoptimize cache and deactivated that plugin. However, Pagespeed still reports a zero score for Leverage Browser Caching and now also gives low marks for Defer Javascript parsing and Serve Resources from a consistent URL. Do I need to do something else?

That’s the big clue here. You are using something (maybe your theme, maybe a plugin) that is loading javascript in the header. Normally, it should be loaded in the footer, but there are legitimate exceptions.

By default, Autoptimize moves all javascript added by themes and plugins to the footer. That might seem a good idea, but it’s actually terrible because it doesn’t know which really should be in the header, and so it breaks things. You really need to work out what is loading javascript in the header and then ask the developer why.

I can see the following that I’d want to investigate (try right-clicking on the page and selecting View Source):

<script type='text/javascript' src='https://dunbarmedical.com/wp-content/plugins/mailchimp-widget/js/mailchimp-widget-min.js?ver=4.9.6'></script>
<script type='text/javascript' src='https://dunbarmedical.com/wp-content/plugins/revslider/public/assets/js/jquery.themepunch.tools.min.js?ver=5.3.1.5'></script>
<script type='text/javascript' src='https://dunbarmedical.com/wp-content/plugins/revslider/public/assets/js/jquery.themepunch.revolution.min.js?ver=5.3.1.5'></script>
<script type='text/javascript' src='https://dunbarmedical.com/wp-content/plugins/woocommerce-dropdown-cart/js/main.min.js?ver=4.9.6'></script>
<script type='text/javascript' src='https://dunbarmedical.com/wp-content/plugins/wp-tao/assets/js/events.js?ver=4.9.6'></script>
<script type='text/javascript' src='https://dunbarmedical.com/wp-content/plugins/woocommerce-quantity-increment/assets/js/wc-quantity-increment.min.js?ver=4.9.6'></script>
<script type='text/javascript' src='https://dunbarmedical.com/wp-content/plugins/js_composer/assets/js/vendors/woocommerce-add-to-cart.js?ver=5.2.1'></script>

But you really turn off all caching to do this properly. Otherwise you will get very confused.

You also have some javascript errors. (Right-click, and select Inspect Element -> Console):

Loading failed for the <script> with source “https://www.googletagmanager.com/gtag/js?id=UA-90183803-1”.
dunbarmedical.com:156
unreachable code after return statement[Learn More]
chosen.jquery.min.js:516:12
unreachable code after return statement[Learn More]

You need to address them too, especially as the message is expressly telling you that some code isn’t running.

As for the inconsistent URLs, you have your theme loading a font from Google, while a plugin is doing the same thing but in a slightly different way. (Just look at the detailed info that Pagespeed provides.) This is a serious resource suck, and you need to turn one off.

To be honest, you shouldn’t even be thinking about using a caching plugin at the moment. These are quite serious issues and caching will just mask them while your site won’t work properly and will still be quite slow. You have an absolutely huge amount of stuff running on your site, so it needs serious work to optimize it. To make it go fast, you would be better off changing hosts than relying on caching.

Thanks for the feedback. I just have one more question - could the incorrect loading of javascript in the header be the cause of the failure to Leverage Browser Caching?

Thanks again.