Website Speed is one of the factors that affect the way people visit your website and stay on it. As Google has already started considering site speed as a SEO parameter, webmaster have to deal with this factor.
One of the things that have to be considered is Leverage Browser Caching to improve site speed and get better search engine rankings.
Why Browser Caching?
Well if you set an expiry date or a maximum age in the HTTP header for static resources like images, CSS, JS, pdf, swf, etc, modern browsers will load previously downloaded resources from local disks rather than over the network. So if you configure your web server to set caching headers and apply them to all cache able static resources then your web site will appear to load faster.
Here’s a tip on how to enable HTTP cache headers on your website using .htaccess
# EXPIRES 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 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"
#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.