Leverage Browser Caching to Increase Website Speed
If you can leverage browser caching, you can increase website speed considerably. As Google starts considering site speed as a SEO parameter, webmasters can leverage browser caching to improve site speed and get better search engine rankings.
Why browser caching?
If you set an expiry date or a maximum age in the HTTP headers for static resources, modern browsers will load previously downloaded static resources like images, css, javascript, pdf, swf etc. from local disks rather than over the network.
So if you configure your web server to set caching headers and apply them to all cacheable static resources, your site will appear to load much faster.
How to leverage browser caching
Find your .htaccess file in the root of your domain. I edited it with Notepad to add these lines of code below and save it (not as .txt).
## EXPIRES CACHING ##
<IfModule mod_expires.c>
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 text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>
## EXPIRES CACHING ##
This basically enables instructs the browser to cache different static resources like images, javascript, flash, pdf, and icons for the specified period of time. You can increase or decrease the values depending on your specific requirements. The more static or unchangeable your resource, longer the period you can enable browser caching. You can read more about the Apache Module mod_expires and how generation of Expires and Cache-Control HTTP headers instruct the client about the document’s validity and persistence.
You remember our site was slower than 94% sites online and we will present a series of articles on how we are speeding up our site to get better search engine rankings and SEO.
« Previous Post Next Post »



Hi, i’ve insert in my htaccess the code below, but, if i check with google page speed it don’t recognize the leverage browser caching in my site. Why?
Thank you.
same i inserted into my htaccess and had no effect……………..
I am also using windows server, Facing the same problem
same, when i deleted the
## EXPIRES CACHING ##
and
## EXPIRES CACHING ##
it causes an error
Just so everyone knows, his .htaccess method does not work save some time adn do something more simple
ExpiresActive On
ExpiresDefault “access plus 1 month”