9 Ways on How to Improve Your Website’s Loading Speed

Tired of a slow website? Learn how to fix and improve your website’s performance to get faster page load speeds, happier viewers, & better conversion rates.

How to fix a slow loading website

You may have already spent a lot of time working on your site's usability and user experience – which is essential for today's online business – but without optimizing the page load speed of your site, you're ultimately failing both of these. Speed is an important part of both your site's usability and user experience and without it, your is at risk of loosing visitors.

Nobody likes a slow website. Slow page load speeds can drive users away faster than…. well at least faster than the time it takes for the page to load!

QUICK NOTE: Studies have shown it takes ONE second for a viewer's flow of thought to stay uninterrupted. Every second after, your website is at risk of losing that viewer's interest. Your goal is to get your website to load one second or less.

The Website's Load Time is Important!

In the early days of the web, many websites were static HTML, basically a plain text document, so theoretically it would take very little time to load. However, connection speeds were also low (if you're too young to remember browsing the web on a 28.8 modem, this is like being forced to drive 1 mile per hour on the highway). It was very important to consider image size and number of graphics on a web page, not to mention that dynamic websites were loaded using CGI; which slowed down things considerably. Now, bandwidth has increased. We can do a lot more on the web, and of course, we do.

However, it's important to remember that the old rules still apply.

Despite the fact that our internet speeds and the devices we use (like laptops, tablets, & smartphones) are becoming faster and faster each year, our patience seems to get shorter. It's never enough. We want what we want and we want it now. This is why it's very important for online businesses to optimize their website's load time.

In this article, we'll discuss the best practices and current technologies used for optimizing a website's page load speed so that you can apply these to your own website.

ALSO READ: Speed also matters for SEO.

Testing Tools

Before you start anything, you will need to have a method of determining what is slowing your site down and a benchmark of your current website speed to measure improvements. The problems listed below may or may not be your chief issue, but you will have no way of knowing unless you can monitor the process.

You should be aware that there are a lot of gives and takes. Some of the solutions below may sound like they contradict each other. That is because sometimes the solution to one problem may increase a speed problem down in another aspect of your site. For example, creating image sprites could cause the need to load one large image at first, which, while reducing the need to load many other images, could slow initial load time (I will go into these methods more later).

For this reason, you should be measuring the results of one change versus another so you can determine what gives the best results.

Here are a few useful tools:

  • Google Page Speed Insights – This free tool from Google will check any URL and run a test on your site for its performance. It provides different results for how your site works on both desktop and for mobile platforms. It will cover many of the areas discussed in this article and give suggestions about what might specifically be causing your site to slow down. However, this tool does seem to be very aggressive and sometimes unrealistic, so keep this in mind.
  • Pingdom Website Speed Test – Pingdom also has some great speed testing solutions, which can test your site from multiple locations around the globe (this is one of the reasons why it's a good idea to use a CDN; more on this below). It provides many practical solutions for improving your speed.
  • Yslow – This is a free plugin for your browser that will provide you with a grade based on the number of HTTP requests, image sizes, whether a CDN is being used, etc.
  • Performance Budget Calculator – This is a helpful little tool for figuring out what sort of content you can “afford” (based on bandwidth) to keep your site running optimally.

CAVEAT: Another important thing to take into mind is which approach best improves the user's experience. You should find out whether additional load times versus gradual load times are most effective. The best way to do this is with usability testing and specifically A/B testing.

How to Make Your Website Load Faster

Okay, so now that you have some testing tools, let's dive into the actual things we can do to speed up our websites!

DO YOU USE WORDPRESS? There are many plugins & specific WordPress optimizations available to do a lot of the tasks listed here! Check out our article exclusively meant for making WordPress faster.

1. Your Files are Too BIG or You Have Too Many

Remember earlier how we talked about how important file size was in the early days of the web? It's still important. While this may seem obvious, it still needs to be said. Large files take longer to load.

Use smaller files and fewer of them (also this might actually increase user experience. While people do like images, too many can create information overload)

Most of the time, you don't need very large images. While it is easy to resize an image using CSS, if you are doing this to make a file smaller, then you are wasting bandwidth. Resize your images before you upload them. It's amazing how much smaller you can make them.

2. Turn on GZIP Compressing

Even after you've reduced your file size, it's a good idea to compress them, along with the rest of your site before sending it to the user. You are likely already familiar with this concept. Sometimes you need a way to send a lot of files over a network, so you've needed to “zip” them up to be a size that will be allowed by your provider. Well, HTTP compression is pretty much the same thing.

Most web servers will allow compressing files with a utility called gzip. Gzip will take all of the files on your site, compress them into a much smaller size before sending to the user's browser. This will work with all of the files on your site. Here are also some other handy online image compression tools available for you to compress the files on your site.

3. Caching

You can also give instruction to browsers about when it should use a cached version of your site versus a new version. By using Expire Headers you can tell the user to use cached content if it is static, but also leverage when in needs to load new content, such as with dynamic content.

4. You Have Too Many Server Calls (HTTP Requests)

This is one of the most important things to consider when speeding up your site. Every time you request a new file, or redirect the site for any reason, this slows down the process. With each one, the user's browser must take the trip to your server, which will then find the resource, and pass it back through to the user. While this is okay in small doses, each server call (especially if they are happening on the same page) will slow down your site drastically.

Every single file you request or have on your site sends a call to the server. If you have 20 images on your site, that's 20 times the server has to be called. There are a number of things you can do to reduce these.

  • Use CSS image sprites – these are single images which include a composite of all of the images on your site as one image. You can use CSS to provide only the part of the file that is necessary to be shown in a specific location. This means that instead of 20 calls for 20 images, it will call only one large image. However, be wary – while this reduces number of calls to the db which will definitely speed up your site, image size can still be an issue.
  • Fix your broken links – every time you try to send someone to a page that no longer exists on your site, it causes your server to deliver a 404 page. Essentially this means that it looks for the page, gets a not found message, and then must retrieve a custom error. Each one of these server calls can slow you down.
  • Reduce redirects – try to reduce the amount of times you choose to have your server to send someone to a different page. While this may seem helpful (for example, for SEO) to have pages set up for this purpose, if you make too many server calls, this can slow your site down and negatively impact user experience.
Example of an Image Sprite
An example of an Image Sprite. Image Source

6. Your Website's Coding Needs Optimization

  • Minify your CSS and your javascript – Blank space means something to the web browser. It may look empty to you or me, but each blank space is a character which must be read and rendered. In many cases it is not necessary, so you use some minimizing tools to compress these files into still working but faster to read components. Google has some good tools available to help you minimize your JavaScript and your CSS
  • Use HTML instead of PHP if it's not dynamic content – While much of your code may be dynamic, sometimes it's fine to go old-school and just use plain HTML code. PHP must be run through a processor. HTML is interpreted directly by the browser. If it's just static content you are delivering, then store it statically.
  • Put your CSS at the top and JavaScript at the bottom – This is an old rule, but it still applies. You need the CSS to be rendered quickly, but JavaScript should only be run after the page itself loads. Also you may wish to not depend too much on calling JavaScript from an external file. If there's not a lot of it, include it directly on the page, as this is one less HTTP request that needs to be made.

Note: If you are using large popular JavaScript libraries, such as JQuery, the advice is a little different. You will want these in a separate file, but realistically it's an even better idea to use the jQuery directly from a CDN. This has a couple of advantages. Because these libraries are popular, there's a very high likelihood that the user already has a cached version of this library, so loading it takes no time at all. If you have your server provide it, this is another server call, and the entire library will be need to be loaded for it to work. This can add to your website's slowness.

Okay, so now you've looked over and fixed as much as you can internally, but it still seems slow, especially from long distances. Let's look at some server tools.

7. Your Site is Slow Because of Latency

Latency is a term which refers to the amount of time it takes for your server to respond to an HTTP request. The reason this is important for the same reason that you don't want to make too many requests. If you can speed up this time, it will drastically increase the speed of your site. Latency increases as a function of the physical distance between the end-user and the server providing the content.

Website latency example

One of the best ways of handling this is by using Content Delivery Networks, or CDNs. These cache copies of your website content at various places on the globe, so that latency is decreased for each of those locations. The most well known CDN providers include Akamai, Cloudflare, and Amazon AWS, but there are many others. Researching using a CDN is well worth your while, especially if you have customers that are far from your server's location.

8. Your Database is Too Slow

Most websites today rely heavily on content which is stored in a database. This is especially true for eCommerce sites. You likely have many products and need to store them and provide them with a click. While databases are great and are your friend, the database could be inefficiently organized, or there could be a number of bad queries. Remember, if a user has to wait several seconds between each query, this adds up. If users don't find the exact product they want right away, or if it takes too long, they may leave without a purchase. Even if they do find something, the odds that they will continue browsing will also decrease with every second extra it takes.

Here's a good step by step guide on how to get started with this on a MySQL database.

Note: If you have a large database, you may need to hire a database professional to assist you, as this can get somewhat involved.

9. Your Web Hosting Provider is Just Not Fast Enough

No matter how much fiddling and tweaking you do to your website, it's only as fast as its weakest link – which in this case, is your web server. Choosing a fast web host is the foundation for a fast website. In fact, you could break all your optimizations into two main parts – 1) your website optimizations and 2) your web server optimizations. Web hosting is crucial and it's why we've written extensive guides about it. Your web server is actually quite complex and there's a lot of configuration that's needed for both the hardware and software of the physical server, but fortunately, most web hosting plans are managed, meaning that the web hosting company will do this for you. For a list of some good companies to use, we've published this article on the fastest web hosts.

Conclusion

While each of the above-mentioned categories can be delved into in much greater detail, if you follow these guidelines, you stand a very good chance of cutting your website load time in half or more, and you most certainly will improve the speed of your site. Please let me know in the comments section if you have any questions.

About the author


  • Jason Simon is a Web Developer and Usability expert who has been creating websites for over twenty years. He holds a Masters in Library and Information Science, and consults businesses, non-profit organizations, and educational institutions in organizing and converting complex data into clear and easy-to-understand information.

ADD A comment


Leave a Reply

The HTGO Newsletter

Get weekly emails on something REAL you can use or do to improve your website and grow your business online!

QUICK TIP: When running a newsletter for your business, it's best practice to implement a double opt-in (also known as confirmed opt-in). This is where a new email address is only added to your mailing list after the subscriber clicks a confirmation link. This helps to ensure the subscriber really wanted to join your newsletter and makes for a quality mailing list. So check your email and confirm your subscription!

Pin It on Pinterest