The speed of your site is an important part of providing users with a positive experience. There’s a multitude of elements that ensure a speedy site and in this article we identify and explain some of the more important issues that all provide a good cost:impact ratio.
Regardless of how you measure it, a faster site is a better site. It is widely accepted that page speed is a ranking factor too, and therefore a double whammy in terms of improving both UX and SEO.
Everyone knows ‘time is money’, an adage that’s been adopted by the latest generation and taken on by anyone involved in digital marketing. There’s an ever-increasing expectation for next-day delivery, 1-minute drive-thrus and even instant noodles! 3G and 4G have come on leaps and bounds in terms of speed and the internet is fast becoming another area of people’s lives where they expect everything yesterday and where patience is a premium.
Google feels the same way; they’ve indicated that page/site speed is one of the many signals used when ranking URLs.
It’s important to assess and understand your site speed and that of your competitors too, Zazzle Media have built a handy tool that (with some input) really digs deep into competitor analysis both for site speed and general site optimisation.
In the below sections we have identified the most important and commonly neglected aspects of site speed.
When a visitor visits your website a series of requests are made to your server to deliver the required files.
Gzip is a combination of both Huffman and LZ77 coding - if you paid attention in mathematics you’ll know that algebra works by substituting unknown values with letters or characters. The LZ77 element of the compression works in a similar manner but instead of unknown values, it is based on similar/common strings - so any repeated words or text strings reference the first occurrence. You can see how this would work in the below example:
Huffman coding works by compressing the binary ASCII format based on the more commonly-repeated characters such as spaces, vowels etc. Below is the same example, but with the top five most frequent characters from our phrase.
No, Gzip takes care of all of this for you. But learning is fun and hopefully you understand just what goes into this compression process.
In a similar manner to Gzip, minification is about cleaning up your files to make them efficient. It works by removing any spaces, commas, comments or other unnecessary characters. Depending on how clean the original resource was, this can greatly speed up file delivery.
Think of it as every car in a traffic jam going bumper to bumper, you’d certainly reduce the length/size of the jam...although pulling away could make for some fun!
Redirections can affect site and page speed in two different but equally damaging ways.
The first issue relates to how many times the URL redirects in a chain. For example, consider the below journey, where each step requires the browser to issue a request and await a server response.
Redirects are often unavoidable and in many cases necessary. However the chains can be reduced in length both by providing users with the appropriate link in the first place and with the efficient use of rewrite rules in the .htaccess file (or similar). Redirect chains have a more important impact on SEO as authority can be lost on each step - effectively reducing the power your links are providing the page and site.
In a similar manner to the above issue, if you request files from a URL that redirects your request, this can increase the round trip time (RTT) for your request and delay the speed at which the resources are loaded.
Hosting files yourself puts you in full control of where your site’s content is loaded from, but isn’t always possible without heavy customisation (for example Google Analytics or Google Tag Manager).
You’ve likely had a multitude of IT professionals suggest you clear your cache or delete temporary files; it’s right up there with “turning it off and on again” in terms of a catch-all IT solution.
Browsing caching is when Chrome, Firefox, Edge or other browsers keep a local copy of a file from the sites you visit. It’s quicker to request these files from your computer than it is to make a request to a web server - this way, when you revisit a site, the entire page doesn’t need downloading a second time.
You can configure your ‘expires header’ to set a lifetime on the cachable elements a year is often a reasonable lifespan for all site elements. Google has provided additional information around caching if you fancy some extra reading.
Unsurprisingly your server can have a notable impact on the speed at which your pages load. It’s unlikely to be worth sacrificing uptime or dramatically increasing your spend, but it’s critical your server can handle the number of requests based on visitor volume and the sheer amount of requestable content.
We recommend finding a host with flexible plans in case you need immediate growth. With viral marketing this can happen frequently and often the influx of users can crash or severely hamper a site.
CDNs (Content Delivery Networks) are collections of servers positioned across the globe that deliver web content such as sites and videos - the most appropriate (closest) server is used based on the user’s location, thus ensuring a fast and efficient response. CDNs aren’t always an essential part of improving your site speed but can act as the cherry on top.
CloudFlare are one of the market leading providers of CDNs and their image below shows just how beneficial a CDN can be, not just for speed but for security too.
Most sites are made from more than just lines of code and text. Images, whether used as backgrounds, icons or infographics, play a major role in how sites look and fee. More to the point, they are also some of the biggest culprits for slowing down sites. There’s a few pain points that need addressing when checking if your images are a cause for concern.
The first thing to consider is what format to use save your image. The below chart illustrates the format you should be using:
After deciding the format of your image you need to ensure you do not upload it at a size that is beyond its maximum displayed dimensions. For example, if your site’s maximum width is 1080px there is rarely an occasion where your images need to be wider than this.
An important part of image sizing is to ensure you serve scaled images wherever possible. For example, don’t ask the client to request a unique image 1000px wide if it’s displayed in a container that is only 200px wide; not only is this wasteful but will slow down the site.
Once you know which format to use you’ll need to consider how best to compress your image. despite its unrivalled popularity as a design tool, Photoshop hasn’t quite caught up with being able to provide perfectly lossless files, with results often compromising quality or still being rather large in terms of Kb/Mb.
While the appropriate image size and format will go a long way to minimising your file size, we would also recommend running your images through a third party site or tool such as https://tinypng.com/. TinyPNG will losslessly compress your files to minimise the file sizes without any noticeable loss to quality.
You may choose to merge files to reduce the number of requests, or even place some of the code inline or in the head of your website. This is often done with critical code to ensure the page doesn’t load in stages and cause content to change its position as any impatient users navigate the page.
There are a number of sites and tools that can be used to help you audit and improve your site. Our favourites are Gtmetrix.com and Google’s PageSpeed Insights. Gtmetrix certainly warrants a free account as it will record recent searches and allows you to set a location/country. Google’s tool can be extremely useful if you’re looking to analyse your mobile page speed specifically but without a unique URL (such as /m or m.) to provide.
Hopefully this article has provided you with both an understanding of the contributing factors to a sluggish site and a quick skim over how they work. If you fancy some extra content on web design then check out this article of simple tips.
The tools and information above, combined with a helpful development resource, should allow you to make all the major changes needed to boost your site’s speed.
Sign up for our monthly newsletter and follow us on social media for the latest news.