+91 88 00 563434 [email protected] Blog open-book Knowledge Base

Find Solutions in Our Knowledge Base

How to Solve Leverage Browser Caching Warning in WordPress?

You are here:
Sharing is Caring

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.


Sharing is Caring

Leave a Comment

Table of Contents