How to fix leverage browser caching for higher Pageranking

Google Page Insight Test:- Fix leverage browser caching 

Off course we all need super fast website as speed is one of main factor affecting Google Page Ranking. There is an Google article which clearly explain about the importance of website speed in modern world.

Now once you have gone through Google PageSpeed Insight Test there is higher chances of getting below error

Should fix or Consider fix ” Leverage browser caching“.

Leverage browser caching

Before fixing this issue I would like to explain “Leverage browser caching“.

Leveraging browser caching” means forcing or instructing web browser cache how website resources should be dealt. It tells the browser when to expire the resources in cache like images(png,jpeg etc), JS, PDF’s,htmls etc.

In order to fix this issue we need to do some configuration changes in .htaccess file. Add below lines in your .htaccess file.


AddType image/x-icon .ico

<IfModule mod_headers.c>
<FilesMatch “.(ico|gif|jpg|jpeg|png|flv|pdf)$”>
Header set Cache-Control “max-age=29030400”
<FilesMatch “.(js|css|swf)$”>
Header set Cache-Control “max-age=604800”
# 24 HOURS
<FilesMatch “.(html|htm|txt|php)$”>
Header set Cache-Control “max-age=86400”


 Below are the step by step Easy Tutorials to fix this issue.

Step1:- Login into Cpanel

fix leverage browser caching

Step2:- Locate and Open “FileManager“.


Step3:- Goto PATH /home/public_html/<Website_Name>

Step4:- Open file name .htaccess in CodeEditor and Paste above mentioned code as Example below :-

fix leverage browser caching

One can also set their own retention settings.

Note:- It is always a good practice to take backup of file first in order to avoid any misconfiguration.

Please watch a short YouTube Easy Tutorial 

Thanks for your valuable time. Please don’t forget to like us on Facebook and subscribe on YouTube.  

Featured Video

Facebook Comments
Like Love Haha Wow Sad Angry
Share with friends

You may also like...

Top Categories
Now enjoy our special red WhatsApp button
More in Cpanel, Easy Tutorials
Cplusplus code for Game/Project “Dus Ka Dum”

*********************Intended for Schools and Colleges Audience************* Often we have to...