Bootstrap Templates Bundle

Showing posts with label website-speed. Show all posts
Showing posts with label website-speed. Show all posts

Tuesday, September 10, 2013

Add Cache-Control Headers in your root .htaccess file

By adding cache control header into your .htaccess file, it can be possible to speed up your website.
Here is the way  how to add Cache-Control Headers in your root .htaccess file

# 480 weeks
<FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=290304000, public"
</FilesMatch>

# 2 DAYS
<FilesMatch ".(xml|txt)$">
Header set Cache-Control "max-age=172800, public, must-revalidate"
</FilesMatch>

# 2 HOURS
<FilesMatch ".(html|htm)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>

Explanation: The first portion of the code will cache your .ico, .jpg, .png, .css, .js, .swf file for 480 days. You can change this 480 days by your one by changing red color portion
480weeks= 480*7*24*60*60=290304000


How to test website speed and perormance

There is some website/tools which will help you to test your website and performance. It is necessary to speed up your website. After testing your website speed you can take necessary steps to increase your website speed.

Website speed and performance testing website link:
http://tools.pingdom.com/fpt/
https://developers.google.com/speed/pagespeed/insights
http://www.webpagetest.org/
http://www.serverspeed.com/



Wokiee React eCommerce Template