Loading speed is still a common issue for many websites from small to big today. If your website takes longer than 2 seconds to load, then it most people will leave your website and go elsewhere without a second thought – and will never again return to your website.
There’s also another consequence to slow loading times, Google are now using loading times as a ranking factor on search results. So, if your competitors have faster loading times, then chances are there website could rank higher than yours in search engine results – potentially costing you a great amount of traffic. Below are some quick ways of increasing your loading times with .htaccess:
# Enable GZIP compression
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
# enable keep-alive
Header set Connection keep-alive
If you’d like help doing this on your own website, then please do contact me.