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“.
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
Header set Cache-Control “max-age=29030400”
Header set Cache-Control “max-age=604800”
# 24 HOURS
Header set Cache-Control “max-age=86400”
EXPIRES CACHING ##
Below are the step by step Easy Tutorials to fix this issue.
Step1:- Login into Cpanel
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 :-
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.