How to enable Leverage Browser Caching in website with .htaccess

28. June 2014 SysAdmin 0

Issue

  • How to enable Leverage Browser Caching for my website or server.
  • How to set expiry time for my website contents.
  • How to enabled Leverage Browser Caching for my wordpress / joomla / drupal / django websites.
  • Webpage performance test sites like gtmetrix.com and webpagetest.org reports that Leverage Browser Caching is not enabled on my website.

Environment

  • Website running on Apache web server
  • Website running on cPanel shared hosting

Resolution

Add the following entry in your .htaccess file.
Now go to [gtmetrix.com](http://gtmetrix.com/) and test your site. You should see 100% gzip compression.


Leave a Reply

Your email address will not be published. Required fields are marked *