{"id":706,"date":"2017-05-06T14:16:25","date_gmt":"2017-05-06T14:16:25","guid":{"rendered":"https:\/\/chemicloud.com\/kb\/?post_type=article&#038;p=706"},"modified":"2020-08-06T19:31:50","modified_gmt":"2020-08-06T19:31:50","slug":"enable-leverage-browser-caching","status":"publish","type":"ht_kb","link":"https:\/\/chemicloud.com\/kb\/article\/enable-leverage-browser-caching\/","title":{"rendered":"How to enable Leverage Browser Caching"},"content":{"rendered":"<p>In this tutorial, you will learn how to enable Leverage Browser Caching for Images, CSS and JS on your website. Once enabled, <strong>browser caching<\/strong> 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.<\/p>\n<p>This is useful for design elements such as <strong>CSS<\/strong> stylesheets and media content such as <strong>images<\/strong>. It is a practical solution as when someone uploads an image that doesn&#8217;t change very often to their website.<\/p>\n<p>This reduces bandwidth and increases page loading times.<\/p>\n<h2 id=\"how-to-enable-leverage-browser-caching\">How to\u00a0Enable Leverage Browser Caching<\/h2>\n<p>To enabling browsing caching, all you need to do is add this code to your .htaccess file:<\/p>\n<pre>## EXPIRES CACHING ##\r\n&lt;IfModule mod_expires.c&gt;\r\nExpiresActive On\r\nExpiresByType image\/jpg \"access 1 year\"\r\nExpiresByType image\/jpeg \"access 1 year\"\r\nExpiresByType image\/gif \"access 1 year\"\r\nExpiresByType image\/png \"access 1 year\"\r\nExpiresByType text\/css \"access 1 month\"\r\nExpiresByType application\/pdf \"access 1 month\"\r\nExpiresByType text\/x-javascript \"access 1 month\"\r\nExpiresByType application\/x-shockwave-flash \"access 1 month\"\r\nExpiresByType image\/x-icon \"access 1 year\"\r\nExpiresDefault \"access 2 days\"\r\n&lt;\/IfModule&gt;\r\n## EXPIRES CACHING ##<\/pre>\n<p>That&#8217;s it. Now you know how to enable Leverage Browser Caching for your website.<\/p>\n<p>If you are a ChemiCloud customer, we have you covered.\u00a0<strong>Leverage Browser Caching\u00a0<\/strong>is enabled by default on all our <strong><a href=\"https:\/\/chemicloud.com\/#choosePlan\">web hosting<\/a> <\/strong>plans.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"ht-kb-category":[191],"ht-kb-tag":[],"class_list":["post-706","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-website-speed"],"_links":{"self":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/comments?post=706"}],"version-history":[{"count":3,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/706\/revisions"}],"predecessor-version":[{"id":3231,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb\/706\/revisions\/3231"}],"wp:attachment":[{"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/media?parent=706"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=706"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/chemicloud.com\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}