How to Fix the Leverage Browser Caching Warning in WordPress

How to Fix the Leverage Browser Caching Warning in WordPress

Google PageSpeed Insights is one of several useful tools for measuring website performance. However, some of its suggestions – like the ‘Leverage Browser Caching’ warning – may be confusing to inexperienced site owners.

When you break it down, caching isn’t all that tough to understand. With a few tweaks, you can implement this development best practice on your site to cut down loading times and improve your PageSpeed score.

In this post, we’ll kick things off with an introduction to the Leverage Browser Caching warning. Then we’ll share several tips for fixing this issue on your WordPress site.

Let’s jump in!

What Is the Leverage Browser Caching Warning?

In order to understand the Leverage Browser Caching warning, it helps to first know a bit about Google PageSpeed Insights. If you’re new to the platform, we recommend reading our complete guide, Google PageSpeed Insights: Scoring 100/100 With WordPress.

The Leverage Browser Caching warning is one of many ‘diagnostics’ Google PageSpeed used to return as a suggestion for improving your score like the following one:

Leverage Browser Caching warning in Google PageSpeed Insights

In Version 5 of Google PageSpeed Insights, this message was replaced with the “Serve static assets with an efficient cache policy” warning:

pagespeed serve static resources

Serve static assets with an efficient cache policy warning in Google PageSpeed Insights

Despite the change in language and appearance, the solution to these warnings is the same.

Google suggests using browser caching to reduce page loading times and improve performance. In a nutshell, caching is when users’ browsers save static copies of your site’s pages. Then, on subsequent visits, this content can be re-loaded faster because the browser doesn’t have to contact your site’s server in order to access the requested resources.

However, every cached resource needs a specified expiration period. This tells browsers when content on your site has become outdated, so it can replace its cached copy with an updated version.

If you’re seeing the “Leverage Browser Caching” warning in your performance test results, it likely means one of two things:

  • The Cache-Control or Expires headers are missing from your site’s server or that of a third-party.
  • The necessary headers are present, but the expiration period is very short and therefore doesn’t have much impact on performance.

The solutions to this warning involve fixing one or both of these issues.

?Warning! Leverage Browser Caching? If reading those words makes your heart race, you’ll want to check out this guide



This article was written by Jon Penland and originally published on Blog – Kinsta Managed WordPress Hosting.

Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the product, We may receive an affiliate commission.

Leave a Comment

You have to agree to the comment policy.

Scroll to Top