Have you ever tried to load a slow-loading website or an app that takes forever to open? What steps can you take to optimize your web experience for speed?
You’re probably familiar with the dreaded “Loading…” screen, which lets everyone know that something on the internet isn’t working quite as intended. People usually tend to blame their ISP connection when this happens, but it’s very likely they don’t have enough resources for their website or app.
In this article, we’ll run through some of the reasons why websites can be slow, and how you can optimize your site for speed to ensure that your users don’t have to wait for more than a few seconds before being able to view the content.
These days, loading times are a key factor in user drop-off. A recent study by Kissmetrics found that 47% of visitors will leave a website if it takes more than three seconds to load.
So if you’re a web professional, small business owner, or even a solo blogger, don’t overlook your website’s need for speed. To keep your website’s performance in tiptop shape, even if you use Shared Hosting, read on to learn how to boost your website speed.
Measure Your Website’s Loading Speed
First, determine the current state of affairs on your website by taking a look at what exactly takes so much time to load.
To help you do this, there are several website performance evaluation tools that you can use, such as:
A good rule of thumb? If the tool indicates that your website takes 3 seconds or less to load, you’re in good shape. If it takes longer, it’s worth investigating the root cause. These tools are ultimately designed to show you the loading process for your website, each HTTP request made, and will offer recommendations on the critical aspects if any. Oh and don’t forget to backup your website and database files before proceeding with any changes to your website itself.
Make Sure It’s Not Hosting-Related
If your website seems to be slowing down, this may be the result of shared server space or your website’s hosting provider. The latter might not be equipped to handle your content management system (CMS).
The easiest way to test if the problem is actually with your hosting is to create a subfolder in your website’s root directory with an empty index file. From here, you’ll want to run a test of your website’s loading speed by using the empty webpage’s URL. This is a quick and easy way to test if the issue is true with the server response time or with your website’s optimization.
If the empty webpage takes forever to load, we recommend reaching out to your server administrator or your respective hosting provider to check for any backend issues. If they identify an issue and confirm that they’ve sorted it out, run the test again but now with your actual website’s URL.
If your website happens to run on WordPress, consider Managed WordPress Hosting. Fully optimized for website speed, this helps solve a variety of issues that could be slowing down your website.
Start Optimizing Your Content
So you’ve ruled out your website hosting. Now what?
Try taking a look at your website’s content, which may or may not be properly optimized. In this case, when we refer to optimization, we’re mainly talking about images and media content.
So, how do you optimize your content? Here are a few ways:
- To reduce image size, without compromising on quality, try compressing. Luckily, there are plenty of website plugins for image optimization, such as Kraken.io or Imagify. If you use cPanel, the “Optimize Website” function also works well.
- Make sure to load images directly to your server. This gets rid of any unnecessary HTTP requests to load your images from another source.
- Deliver the proper image size for your user’s screen. Remember that wasted pixels add unnecessary weight to your website.
- Use lazy loading for your media content. This means that your images only load when they come into a page visitor’s view.
Check for Any Unnecessary Plugins and Themes
They say that “less is more.” And when it comes to the number of plugins and themes you have installed on your website, this familiar saying definitely applies.
It makes logical sense but the more plugins and themes you have in your backend, the more likely this will slow down your website. If you do happen to have quite a few in your arsenal, try disabling the ones that your content is less dependent on to see if it makes any difference. You can also try checking each theme and/or plugin, one at a time, to figure out which one might be dragging your website down.
This is also the time to check and see if your plugins and themes are up to date, version-wise. If you’re comfortable with coding, you can also consider this an opportunity to create your own code to see if that helps with slow loading times.
Consider the Cache
Picture this usual scenario. Every time your website loads, it needs to find the files and data that make up each particular page.
This is where something called “caching” comes into play. Caching is that process where commonly-requested data is stored locally, either on your server (server-side caching) or your website browser (HTTP caching). Caching frequently accessed data points on your local machine essentially means that your website doesn’t waste any precious time searching for each one.
So depending on which server type you’re on, don’t forget caching. If you use Shared Hosting or Managed WordPress Hosting and your abilities are limited, try browser caching. Website browsers use a cache that reduces the number and size of HTTP requests, making web pages load even faster. We suggest adding the expires header rule to your .htaccess (if you’re using website hosting on an Apache webserver) to tell the browser how long your web page contents should be kept for.
Remember that website browsers will not render any processed content and load the page of your website until it loads the CSS first.
What’s CSS, you might ask? Short for Cascading Style Sheets, CSS brings style such as fonts and colors to your web pages by interacting with HTML elements.
So the bigger your styles are, the longer it takes for any web page to come up. Things like comments, whitespace, and indentation are all unnecessary CSS characters that can slow your website down. Think of this as your opportunity to check which parts of your CSS code can be safely removed, without causing any issues to your website. We suggest contacting a web developer for personalized help or using an external tool like CSSNano.
Use a Content Delivery Network (CDN)
A CDN, short for Content Delivery Network, is a group of servers distributed around the world to cache (store) and deliver assets such as images and video to your website visitors faster.
When someone visits your website’s homepage, this content gets loaded from the nearest CDN server, while the rest gets loaded from your server. This, in effect, speeds up page delivery for your website.
The main goal of a CDN is to offload the bandwidth strain on your original server to somewhere else. This is often the server that’s closest to the website visitor who is trying to load your website in the first place.
While a CDN certainly doesn’t replace your hosting provider, it does take your website to the next level.
And sure, maintaining your website takes work but it’s worth it. When you understand why website speed is so important and that it supports a healthy business, you won’t mind so much keeping a constant eye on its performance and ranking.
The article is by Loft Uganda, a Design and Development agency based in Uganda.