+91 88 00 56 3434 

sales@webhostingpeople.net 

How to Solve Leverage Browser Caching Warning in WordPress?

You are here:

Leverage Browser Caching refers to the practice of storing static information of a website in the browser of the user. The main reason for the leverage browser caching issue is the absence of appropriate headers on the web server. Such problems can be addressed by adding expires header codes in the .htaccess file.

1) Begin by logging in to cPanel.

2) Navigate to the ‘File Manager’ option within the file section.

Leverage browser caching

3) Check the box for ‘Show Hidden Files’ and click the “Save” button.

Leverage browser caching

4) Locate and edit the file named ‘.htaccess’ in the public_html directory.

Leverage browser caching

5) Insert the following codes into the ‘htaccess’ file.

## 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 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 2 days”

## EXPIRES HEADER CACHING ##

By following these steps, the leverage browser caching warning in WordPress can be successfully resolved.

Leave a Comment

Table of Contents
WebHostingPeople
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.