Why Website Loading Times Are Vital - How to Improve Yours
We've all visited a website only to be greeted with depressingly long website loading times. Poor web design, poor coding, bad configuration and cheap servers all contribute to website loading times and performance. Website loading times have often been cited as the number one reason for people abandoning a page. Statistically, if your page takes even just four seconds to load, you can expect a 25% abandonment rate.
Measuring Website Loading Times
Website loading times can be measured using a variety of tools, each offering a different set of advantages and disadvantages. Here are a few of the best free methods for measuring site speed.
Using Chrome or Firefox Browsers
Both browsers offer a comprehensive developer tools feature that shows page loading timeline so not only can you see what the page speed is, but also what elements are taking up the most time.
The default page for measuring site speed should be Googles own PageSpeed Insights
Google Analytics also contains a section measuring Site Speed with various platforms and browsers from around the world. This report can be useful in determining if you need to use a Content Delivery Network.
Factors Affecting Website Loading Times
There are many factors which can harm a site's performance, but here are some of the most common.
Server and Server Configuration
A slow, old, overloaded server regardless of how optimized the content is, will always be holding back your site. Sometimes this is a case of using the wrong hosting package for your requirements or you could be using a bad hosting company. Some Web hosting companies are just plain rotten when it comes to performance. If you suspect your host is causing the problem, it may be time to change, or at least upgrade to a better hosting package if your host provides one.
Related to the hosting company itself, how good is their internet connection? If your server is only running on a domestic ADSL connection then that will be holding back busy website or websites with heavy content payloads (images, videos etc...) Also, even smaller websites need larger bandwidth amounts if they get sufficient numbers of visitors and they will have to "queue" to download files - resulting in very poor performance.
Every business wants to have a great looking website, but going overboard on design themes and styles can lead to considerable performance drops. This is especially true if you use full fize, high resolution images (see below) and automatically play videos and media.
All on-site graphics should be properly compressed. Use thumbnails to represent larger, higher quality images, which when clicked on, open the original image. This will improve page load speed dramatically and reduce bandwidth usage.
How to Improve Website Loading Times
Having run one of the tools above and decided what is causing your site to run slow, it's time to address the issues.
If a lot of time is spent downloading images, try optimising images for the web. This will reduce image size, file size and bandwidth and will result in significant speed gains.
If you use lots of images to represent icons, try switching to using SVG icons or font icons such as the excellent FontAwesome library.
If you are more technically minded, or have a developer who is, try looking at optimizing your php code. You can run performance benchmarks over code segments or pages to see where the bottlenecks are. Maybe your application or database servers need an upgrade?
If you're not already, try enabling compression on your site. Serving compressed pages reduce the amount of code sent to the browser thus saving bandwidth and download times. This can be easy or difficult to setup depending on your server and software, but this guide on improving website speed by enabling compression should help.
As a final resort, consider upgrading your hosting package, server or hosting provider. While this is the most costly option, if your server is holding you back it may be your only option.
Do you have any website optimization tips to share? Have these tips helped your website loading times? Let us know in the comments below!