Enable Leverage Browser Caching To Speed Up Your Website

Leverage Browser Caching is one factor responsible for the browsing speed of your website. Likewise fetching resources over the network can be slow and expensive as some downloads may need multiple roundtrips between the client where your website is requested and your hosting server.

This delays processing and sometimes block rendering of webpage content, and not only this much but it also incurs data costs for the visitor.

Specifying a caching policy in server simply helps client determine when it can make use of previously fetched response. This is also used by Google Page Insights in counting the performance of your website.

This is one common issue you can easily fix either by using some plugin like Speed booster Pack or by manually setting-up an expiry date or maximum age for static resources such as images etc in HTTP headers. This would provide better browser caching on your website.

## 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 ##

All you have to do is open your .htaccess file located in your website’s root directory and paste the given code in there. Thanks to Thomas Griffin for providing us with this code.

One thought on “Enable Leverage Browser Caching To Speed Up Your Website”

Leave a Reply