Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The warning means that one or more files—usually images, CSS, JavaScript, fonts, or other static assets—are being delivered without a useful browser-cache policy. Fix it where the flagged URL is served: configure response headers on Apache, Nginx, your host, or a CDN, then verify the actual response headers. A WordPress plugin toggle or an .htaccess line is not proof that the policy reached visitors.

What the warning actually means

Browser caching is controlled by HTTP headers returned with each resource. A deliberate policy tells the browser whether it may reuse a file, how long it may keep it, and how to check whether it has changed. The relevant mechanisms include Cache-Control (especially max-age), Expires, and validators such as entity tags (ETags).

“Leverage Browser Caching” is older Google audit terminology. Current performance tools may instead say “Serve static assets with an efficient cache policy,” and their exact rules can differ. Google’s PageSpeed Insights API v4 documentation that used the older label is deprecated, so treat its timing advice as guidance rather than a guaranteed current ranking threshold.

First, identify the asset and the layer that serves it

  1. Open the audit details and record the complete URL for every flagged resource.
  2. Note the hostname. Your WordPress origin, a CDN, an advertising network, a font provider, or another third party may be serving it.
  3. Inspect that URL’s response headers. Confirm the returned Cache-Control policy and, where used, Expires and validators such as ETags.

Only the server or delivery layer that returns the response can set its browser-cache policy. If a third-party file is responsible, you generally cannot change its headers from WordPress; remove, replace, self-host, or accept that dependency where appropriate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a cache lifetime that you can invalidate

Long-lived caching is useful for static or infrequently changing files, but it is safe only when an update produces a new URL or you have a dependable purge process. Legacy Google guidance recommended at least one week and preferably up to one year for such assets. That is not a universal current audit requirement, and it should not be applied blindly to frequently changing or personalized content.

Resource Typical policy decision Invalidation requirement
Versioned CSS, JavaScript, fonts, images Long max-age, potentially up to a year Change the URL when the file changes
Frequently edited static files without versioning Shorter lifetime Purge caches or wait for expiry after each change
HTML, account pages, carts, and personalized responses Separate page-cache policy; do not assume a static-asset rule fits Use application-aware invalidation and privacy controls

Use WordPress versioning for CSS and JavaScript

WordPress lets enqueued styles and scripts carry a version value. When that value changes, the requested URL changes, so browsers fetch the new file even when the previous URL has a long lifetime.

wp_enqueue_style(
    'theme-style',
    get_stylesheet_directory_uri() . '/style.css',
    array(),
    '2026.09.30'
);

wp_enqueue_script(
    'theme-script',
    get_template_directory_uri() . '/assets/app.js',
    array(),
    '2026.09.30',
    true
);

Use a release number, build hash, or another repeatable value rather than changing it on every page view. After deploying a new version, purge any page or CDN cache that still emits the old URL.

Configure the server that delivers the files

Apache with mod_expires

If your host permits directory-level rules and has enabled mod_expires, an .htaccess policy can set expiration for common static types. Back up the file and confirm the syntax with your host before changing production configuration.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"
  ExpiresByType font/woff2 "access plus 1 year"
</IfModule>

Expiration directives alone are not a verification method. Check the response from the exact flagged URL and confirm the resulting headers and lifetime.

Nginx

Nginx does not read .htaccess. Add an equivalent policy in the server or location configuration, through your hosting panel, or with help from the host. A common pattern is an expires rule for selected static extensions, paired with a deliberate Cache-Control header. The correct block depends on your existing configuration, MIME types, proxy, and deployment process; reload Nginx only after validating the configuration.

CDN, reverse proxy, or managed hosting

Ask which layer owns the response for the flagged URL and how its cache is purged. A CDN may override origin headers, while a host may expose browser-cache settings separately from page-cache settings. Change the policy at the layer that actually returns the response.

Can a WordPress plugin fix it?

A plugin can be convenient when you cannot edit server configuration, but its requirements are not interchangeable. The cited “Leverage Browser Caching” plugin writes rules to .htaccess, requires Apache, mod_expires, and a writable .htaccess, and does not work on Nginx or IIS. Do not install it as a generic solution on an Nginx site.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Check the plugin’s documented server requirements before activation.
  • Back up .htaccess and test the site after any rule change.
  • Inspect response headers afterward; a successful settings screen does not establish that the server applied the policy.

Clear stale caches after changing an asset

When a new stylesheet or script does not appear, several caches may still contain the old response. Clear only the layers relevant to your setup:

  • the browser cache, or test in a private window;
  • your WordPress page or optimization plugin cache;
  • the host’s full-page or object cache;
  • the CDN or reverse-proxy cache.

Then check that the generated page contains the new versioned URL. WordPress documentation identifies browser and server-side caching as common reasons that edits are not immediately visible.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Verify the fix instead of trusting the warning

  1. Request the exact resource URL listed by the audit.
  2. Confirm a deliberate Cache-Control policy and its max-age value.
  3. Check Expires if your configuration uses it, but do not treat it alone as proof of correct caching.
  4. Confirm validators such as ETags where revalidation is part of your strategy.
  5. Repeat the check through the public hostname, not only from an origin server or logged-in session.
  6. Run the current performance audit again and separate assets you control from third-party resources.

Common failure cases

The warning remains after enabling a plugin

The plugin may be incompatible with the server, unable to write .htaccess, or affecting a different directory than the flagged file. Inspect the live headers and server error logs, then move the rule to the layer serving the asset.

Styles look broken after a long cache lifetime

The URL probably did not change when the file changed. Restore a working version if necessary, then add reliable versioning and purge page/CDN caches before redeploying the long policy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Only external files are flagged

The external provider controls those response headers. You cannot repair them with a WordPress origin rule; replace the dependency, self-host it where licensing and updates permit, or leave it documented as an external limitation.

Adding more page caching did not help

Page caching stores generated HTML. This warning concerns reuse of individual resources, so page-cache settings alone may not change the headers on images, CSS, JavaScript, or fonts.

A practical decision guide

Your situation Best starting point
You control Apache and .htaccess Use a reviewed mod_expires/Cache-Control policy and verify headers.
You control Nginx Set the policy in Nginx configuration or the hosting panel; never use .htaccess rules.
A managed host or CDN serves the files Ask the provider which layer owns the headers and how invalidation works.
You need dashboard management Use a compatible caching plugin only after checking its server requirements.

The Bottom Line

Fix the warning by setting an appropriate browser-cache policy on the server or delivery layer that serves each flagged static file, versioning WordPress assets so updates change their URLs, and confirming the live response headers. Do not apply a plugin or a one-year lifetime without checking server compatibility and invalidation.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.