In this article, we will learn how to fix leverage browser caching warnings in WordPress to improve/speed up your WordPress site and deliver a superior experience to your visitors.
First of all, we need to know what is browser caching in WordPress. So it is basically a way to improve your website loading speeds by creating multiple requests between the browser and your WordPress hosting server.
Actually, browser cache stores a copy of your webpages locally and allow the browsers to load common files faster when the user visits your webpage a second time.
You will receive a browser caching warning when you don’t have browser caching enabled and you have set up your caching in the wrong way.
We can fix leverage browser caching warnings in two ways.
- By adding a WordPress Plugin
- By adding the code manually
Here we are using the Leverage Browser Caching plugin which is the best and user friendly for beginners.
By adding a WordPress Plugin
- Login into your wordpress dashboard and go to Plugins.
2. Click “Add New“, search for “Leverage Browser Caching” and click on Install Now button.
3. Click “Activate” to activate the plugin.
4. After activating the plugin, check your website again and you will find that warning has been fixed.
By adding the code manually
- Login to your control panel. Here I am taking DirectAdmin panel. After login, scroll down and click on “File Manager” icon.
2. Navigate to the domain and double-click on it. Select your domain name(if you are having multiple domains) then double-click on the public_html folder.
3. Here, you will find the .htaccess file. Right-click on this file and click Edit.
4. Copy and paste the following lines of codes into it at the bottom.