By Mark Berka
The faster your website loads, the more traffic it will receive. According to research by Pingdom, a web page that takes five seconds to fully load is abandoned by 38% of users before the page even loads in their browser.
Fortunately, there are a few simple strategies to improve your load times significantly - particularly if your website is set up on the WordPress platform.
1. Use a reliable hosting provider
Your hosting company is the foundation of your website, and no performance strategies will help your load times if your website is housed on a misconfigured server.
When choosing a web host, you'll want to look at the following:
Server uptime: this is the time your website will be accessible to the public. For example, a 99.99% uptime means your website will be "live" 99.99% of the time, or that it will be unavailable for around 4 minutes total per month. Hosts guarantee a minimum uptime on their services. Generally, you want to avoid any hosting with an uptime lower than 99.97%
Server behavior during traffic spikes: it's one thing when your hosting server behaves well when there's just one visitor (usually the website owner) browsing it. It's a whole other story when the site regularly serves dozens or even hundreds of visitors - that's usually where performance issues begin to surface. Check out Mark Berka's hosting rankings for traffic spike simulations on the top hosts for more insights.
Support quality and accessibility: a good support team will help you boost your website's load speed by troubleshooting server performance issues. Ideally, you want a managed hosting account, as managed plans come with the most robust support.
2. Make sure your images are optimized
On average, images make up 20% of a modern web page's size, so it's a good idea to keep an eye out on how much space they occupy.
- Use PNG for simple line images and JPG for color-rich graphics
- Compress your images, either before or during uploading to your website. If you use WordPress, try the free Smush plugin
- Resize your images before uploading them. Avoid uploading an image and resizing it in your visitor's browser with CSS or HTML as the user will end up downloading the full-sized image anyway.
- Enable Lazy Loading for pages that are particularly heavy on images. Lazy Load will ensure that images are loaded right before they are about to appear in your visitor's view, as opposed to loading all images as soon as the visitor opens your page.
3. Use a Content Delivery Network (CDN)
A CDN will store a version of your website on different servers around the world and will serve your website's content to visitors from a server that's closest to their physical location.
This reduces the distance that data needs to travel between the server and your visitor, adding up to considerable load time savings.
CloudFlare is a very popular CDN provider. Their service is free for bloggers and you can enable it by pointing your domain's DNS to CloudFlare's servers. Shouldn't take more than 15 minutes to set up.
4. Reduce the number of HTTP requests
One of the main causes of a slow page load time is a large number of HTTP requests required to load the content. Each time your visitors need to download a JS file or a CSS file, they must send a separate request to your server, which slows down the loading process.
To combat this, consider combining as many JS files into one, and as many CSS files into one, as possible. This way the number of HTTP requests will be reduced significantly, which will reduce load times. If you are using WordPress, the Merge + Minify + Refresh plugin is ideal for this purpose.
5. Leverage browser caching
By default, when someone browses your website, they will download all the same images, scripts, and files repeatedly each time they refresh a page or visit a new one.
By leveraging browser caching, your server will instruct your visitor's browser not to download the same file more than once, at least until the file has changed. This reduces load times considerably, sometimes by as much as 50-80%. Note, however, that this will only improve speed for returning visitors who've already had a chance to download your images/scripts once in the past.