Leverage Browser Caching

As Google PageSpeed Insights says that, leveraging browser caching will make your site faster and more valuable. To open your caching option over your website, there’s a simple method.

Add these lines to .htaccess file.

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
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"
ExpiresDefault "access 1 week"
</IfModule>

This method works on all Linux  based systems. It’s not important if it has WordPress, Joomla, phpBB or any special software.

Add a Comment

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