1. Home
  2. Hosting Management
  3. Website Speed
  4. How to enable Leverage Browser Caching

How to enable Leverage Browser Caching

In this tutorial, you will learn how to enable Leverage Browser Caching for Images, CSS and JS on your website. Once enabled, browser caching will allow visitors to save items from your web page so that they do not need to be downloaded every time they visit your website.

This is useful for design elements such as CSS stylesheets and media content such as images. It is a practical solution as when someone uploads an image that doesn’t change very often to their website.

This reduces bandwidth and increases page loading times.

How to Enable Leverage Browser Caching

To enabling browsing caching, all you need to do is add this code to your .htaccess file:

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

That’s it. Now you know how to enable Leverage Browser Caching for your website.

If you are a ChemiCloud customer, we have you covered. Leverage Browser Caching is enabled by default on all our web hosting plans.


Updated on August 6, 2020
Was this article helpful?

Related Articles

Fast, secure cloud hosting. 18 global data centers. Unhappy with your web host?
👉 Migrate for Free

Leave a Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.