There was a problem loading the comments.

How to enable Leverage Browser Caching

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

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. To enable browsing caching, all you need to do is add this code to your .htaccess file:

 

## EXPIRES CACHING ##
<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"
</IfModule>
## EXPIRES CACHING ##

 


Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  


Self-Hosted Help Desk Software by SupportPal
© Indichosts.net