How to Leverage Browser Caching

You should always be on the look out for ways of optimizing and speeding up your website, this is especially important since Google now considers how fast a website is in its algorithm of where you rank in the search results. One of the easiest (and unknown) ways is to leverage browser caching. So what does leveraging browser caching do? Well to put simply, when you leverage browser caching you are reducing the number of HTTP requests that your server will need to process, which in turn reduces the amount of load time on your blog, thus improving site speed.

Find and Edit the .htaccess File

Going into your files in cPanel and modifying one of them may seem like a ‘scary’ task, especially for non-tech savy folks. Really it is a lot easier than it sounds though. The hardest step you will have to do in this quick tutorial is find your .htaccess file, then copy and paste. It’s that simple. I’ll walk you through step-by-step in how to do this.

First you need to log into your cPanel (some web hosts call it the ‘vDeck’). Next navigate to your files and open the file manager.


Click into the manager and select the root directory of the website you are trying to speed up (also make sure to click on “show hidden files” if it has a button for you to check). Next right click on the .htaccess file and select ‘code edit’.


After that you simply need to copy and paste this at the very top of your .htaccess file:


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 text/html “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 1 month”


Now save your .htaccess file and use either PageSpeed Insights or YSlow to find out how much your website up-ticked thanks to the above method.

Any noticeable improvement? Comment away below.

Other Must Read Articles

Leave a Reply