Are exchanged or reciprocal links okay with Google?
Etmagnis dis parturient montes, nascetur ridiculus mus. Donec lorem ipsum dolor sit amet, et consectetuer adipiscing elit. Aenean commodo ligula eget consyect etur dolor.

Contact Info

(+888)-123-4587

121 King St, Melbourne VIC 3000, Australia

info@example.com

Folow us on social

How to solve it easily Browser caching warning in WordPress

How to fix leverage browser caching warning in WordPress

Want to learn how to easily fix browser caching alert leverage in WordPress?

By correcting the browser cache leverage warning, you will quickly speed up your WordPress site and deliver a better experience to your visitors.

In this article, we will show you how to easily resolve browser caching alert in WordPress.

What is browser caching in WordPress?

Browser caching is a way to improve the loading speeds of your site. When a web page is loaded, all the files are loaded separately.

This creates more requests between the browser and your WordPress hosting server, which increases the loading time of the web page.

When browser caching is enabled, your web browser stores a copy of your webpage locally. This allows browsers to load regular files like style sheets, logos, images, etc. faster when the user visits another page on your site.

This reduces the overall server load because fewer requests are sent to the actual server and your website’s performance improves as a result.

Where do you want to see the browser cache leverage warning for WordPress?

The browser cache leverage warning means you do not have browser caching enabled, otherwise your caching may be configured incorrectly.

When you run a site speed test, you get a report that shows you what you can do to speed up WordPress.

If your site does not currently use browser cache, you will be prompted to enable browser cache.

This is what it might look like when you look at your results from a page speed insight tool.

Sometimes you get a warning saying that your effective cache policy is not working.

Both of these warnings point to an error with your browser caching set up.

Utilizing browser caching means enabling and customizing the caching rules to speed up your site.

That said, let’s take a look at how to easily resolve browser caching alert leverage in WordPress using two different methods.

Just use the quick links below to choose how to fix the browser cache leverage warning in WordPress.

Method 1. Fix Browser caching exploit warning with WP Rocket WordPress plugin

WP Rocket is the best WordPress caching plugin on the market. It is very beginner friendly and can help you optimize your site for speed, even without knowing complex caching and speed conditions.

Just outside the box, all the recommended caching settings will really speed up your WordPress site.

To fix the warning of leveraging the browser cache with WP Rocket, all you have to do is install and activate the plugin.

That is it.

For more details, see our guide on how to properly install and set up WP Rocket in WordPress.

WP Rocket automatically enables browser caching and modifies your .htaccess file with the correct rules.

Note: If you use SiteGround web hosting, you can use the free SiteGround Optimizer plugin instead.

It has almost the same features as WP Rocket and it automatically enables browser caching for you.

Method 2. Resolve browser caching warning by adding code to WordPress

The second method involves adding code to your WordPress files. If you have not done this before, see our Beginner’s Guide to Inserting Excerpts from the Internet into WordPress.

This method is not that beginner friendly, so only follow this if you know exactly what you are doing. For most business owners, we recommend using Method 1.

With that said, let’s take a look at how to resolve browser caching alert leverage by adding code to WordPress.

Note: before customizing your WordPress code, we recommend that you back up your WordPress site. For more details, see our guide on how to back up and restore your WordPress site.

Find out if your site is running Apache or Nginx?

First, find out if your site uses Apache or Nginx servers.

To do this, open your site in a new tab or window. Then right-click and select ‘Inspect’.

Then click on the ‘Network’ tab at the top of the page.

You may need to refresh the page so that the results can be loaded.

Then click on your domain name in the ‘Name’ column.

It should be at the top of the page.

Then in the ‘Response Headers’ section you will see an item called ‘server’ where the server type is displayed. In this case, the site is running on an Apache server.

Add Cache Control and Expire Headers in Apache

To fix the browser cache leverage warning with an Apache server, add code to your .htaccess file.

To edit this file, you need to connect to your WordPress hosting account with an FTP client or your host’s file management tool.

Once connected, you can see your .htaccess file in the root directory of your webpage.

If you can not find it, do not worry. Sometimes this file may be hidden. For more details, see our guide on why you cannot find .htaccess file on your WordPress site.

Next, add cache checks and / or expire headings to enable browser caching. This tells the web browser how long to store your site resources before deleting them.

The cache control head provides specific details to the web browser on how to cache.

The expiration header enables caching and tells the web browser how long to save specific files before deleting them.

You can add the following code to your .htaccess file to add expiration headers:

## EXPIRES HEADER CACHING ## ExpiresActive On ExpiresByType image / jpg “access 1 year” ExpiresByType image / jpeg “access 1 year” ExpiresByType image / gif “access 1 year” ExpiresByType image / png “access 1 year” ExpiresByType image / svg “access 1 year” ExpiresByType text / css “access 1 month” ExpiresByType application / pdf “access 1 month” ExpiresByType application / javascript “access 1 month” ExpiresByType application / x-javascript “access 1 month” ExpiresByType application / x-shockwave-flash “access 1 month “ExpiresByType image / x-icon” access 1 year “ExpiresDefault” access 3 days ” ## EXPIRES MAIN CACHING ##

This code specifies different cache expiration dates based on the file type.

Then you can add the following code to enable cache checking:

Header set Cache-Control “max-age = 96000, public”

This code sets the time when the cache expires. In the example above, the cache expires in 90,000 seconds.

Then the web browser will request new versions of the files.

Add Cache Control and Expire Headers in Nginx

If you use a Nginx web server to host your WordPress blog, you can edit the server configuration file to correct the browser’s cache error.

How you edit and access this file depends on your host, so you can contact your hosting provider if you need help accessing the file.

Then add the following code to add expiration headers:

location ~ * . (jpg | jpeg | gif | png | svg) $ {expires 365d; } location ~ * . (pdf | css | html | js | swf) $ {expires 3d; }

This code sets the expiration times for the different file types. Note that images are cached longer than HTML, CSS, JS, and other file types, as images usually remain the same.

Then you can add the following code to add cache check headings:

location ~ * . (js | css | png | jpg | jpeg | gif | svg | ico) $ {expires 14d; add_header Cache control “public, non-transformer”; }

This code sets the time when the cache expires. It tells your server that the above file types will not change for 14 days.

If you want to speed up WordPress even more, be sure to check out our guide on how to increase WordPress speed and performance.

We hope this article helped you learn how to easily resolve browser caching alerting in WordPress. You may also want to see our ultimate list of the most common WordPress errors and how to fix them, and our expert selection of the best SEO tools and plugins to get more traffic.

If you liked this article, subscribe to our YouTube channel for WordPress video tutorials. You can also find us at Twitter and Facebook.

    Leave Your Comment

    Your email address will not be published.*