Leverage Browser Cache

Browser caching works by marking certain pages, or parts of pages, as being needed to be updated at different intervals. Your logo on your website, for instance, is unlikely to change from day to day. So by leveraging your Browser cache, you are telling browsers to cache your images for a long time.

This is a server configuration, and it depends on your server operating system. We highly recommend you contact your server host and ask them to leverage your browser cache for all kinds of images to 1 year of example.




As for Linux servers, you can do it yourself by editing your .htaccess file and adding the following lines:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/pdf "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType text/html "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 3 hours"
</IfModule>




Was this article helpful to you? Yes No