How to Make Your Website Load Faster
There is nothing more annoying than trying to view a slow loading website.
Well, that is not necessarily entirely accurate, I find the constant flood of telemarketing calls I receive very annoying as well.
But as far as browsing the world wide web goes, slow loading websites is up there as one of the most frustrating.
Search engines have made a concerted effort to encourage web masters to make their websites as fast as possible.
That is because a faster loading site creates a better user experience which is more likely to encourage users to return another day.
How do i make my website fast?
There are several things which you can do, but before we get to work, we will need to analyse your site in greater detail.
First, we will need to find the specific areas of your site which are letting you down.
Then you can begin to take the necessary steps to correct the problem.
Investigating your website load speed time
There are a few tools I would recommend using to examine your site:
Please keep in mind that your results may vary between the different testing tools. Results may vary as a result of having different measurement metrics and their testing servers being located in various locations around the world.
After you have analysed your website the next thing I would suggest doing is cleaning house.
The process of 'cleaning house' involves going through every file within your site and removing any unused code, images, videos etc.
Doing this will help to reduce the amount of code the browser is required to download when a user is visiting your site.
In turn, this will help remove 'wastage' and will improve your website loading time.
When most of us begin our quest for creating the ultimate internet site, we do it on a budget. That is the most common reason we usually go for cheaper hosting providers.
Why does cheaper hosting make my website slow?
Before we begin, we should understand what website hosting is.
A site must have a ‘home’ which is known as a server.
When a person enters your URL into their browser, the first thing the browser will do is search for your server address.
Cheaper hosting providers tend to stack hundreds and sometimes even thousands of websites on the same server.
The problem this creates is that you will typically have tens of thousands of requests coming from browsers all over the world trying to download information from the same server.
Inevitably, will cause your web pages to take a longer time to download onto the user's computer.
The more expensive hosting providers, however, will typically provide more ‘space’ on the server, making it easier for browsers to find the information they are looking for.
Another way of explaining it is that the better servers are like living on a large plot of land, with a large house with only 1 or two people as the tenants.
While the poorer quality servers will have your website located within a high rise apartment block, along with hundreds, if not thousands of other people living with you.
How do I know which hosting provider to use?
It can be a difficult question to answer because it can be challenging to put all the hosting plans side by side to find out exactly what you are getting for your money.
I would suggest taking your time to do some online research and checking out what others have been saying on online forums.
Whichever one you decide to go for, I would recommend finding out the location of their servers and making sure that they are close to where the bulk of your visitors are located.
Obviously, this is more relevant if your website targets a particular area, for example, a plumbing business in Sydney.
Reducing the number of HTTP requests
Every web page is typically made up of several components including, text and images.
When a user enters a URL and hits enter, the browser searches for the location of where the files are being stored (the server).
Once it has found the location, it will begin requesting information from the server.
It will then download the files necessary to render (display) the page onto the user's screen.
Throughout the process of downloading the web page files, it is doing so by sending Hyper Text Transfer Protocol (HTTP) requests.
Each HTTP request will add to the time required by the browser to download a page.
To put it more simply, think about every time you do the shopping. Imagine that each shopping item is an HTTP request.
The more things you need to put into your shopping basket, the longer it will take.
Every time the browser needs to download an image or video, these are all separate HTTP requests.
I suggest removing those HTTP requests which you don't require and combining others where possible.
Doing so will help the browser to download your web pages quicker.
Make your images faster
“A picture is worth a thousand words” - This is an age old saying, and yes, it will make your website aesthetically pleasing.
Images also have the advantage of helping to keep visitors engaged.
However, images take up a significant amount of a web pages size. The larger the size of the picture, the longer it will take to download them.
You can help make your images as small as possible by compressing them or preparing them for the web.
An image is made up of hundreds, thousands or even millions of dots.
The process of compressing an image is done by removing these dots from the picture.
The more dots you remove, the lower the file size, however, the quality will also decrease.
At this point, it can begin to become tricky because you want to reduce the size of the image as much as possible. However, you also want to maintain the picture such that everything is still clear and easy to interpret.
As a general rule, most images should not be above 100kb (there are 1000kb in a megabyte).
Minimise the use of plugins (Wordpress sites only)
Plugins can be useful for many reasons, but unfortunately one of their drawbacks is that they add ‘weight’ to your website.
A common problem I find many people doing is that they will typically have too many plugins installed. By 'too many', I mean the plugins that are no longer required.
I suggest going through all your plugins and removing the ones you no longer require.
By eliminating all the things that you no longer need you will instantly make your web page ‘lighter’. It will help to make your website quicker to download, thus, enhancing your websites speed performance.
Combining external scripts
What is an external script?
An external script is a document separate to your main HTML file which typically adds function to your website.
For example, probably one of the most common external scripts is a Cascading Style Sheet (CSS).
A CSS helps style the individual elements on a page. They set the colour, font size, padding and margins to name a few.
You could eliminate using a CSS altogether by using inline CSS. However, this is very labour intensive and not recommend for anything other than a one-page website.
Often though, a site will have many separate CSS scripts adding too many HTTP requests a browser needs to make when downloading a page.
You can resolve this issue by combining all CSS script files into one style sheet. Doing this will reduce the number of files the browser will need to download.
I suggest checking all the external scripts of your website and applying the same method.
If you are not using some of the scripts, then you should remove them all together.
Optimising your CSS and JS files
The most common scripts on any website will be the CSS and JS scripts.
There are two methods for compressing them - minifying and gzipping.
For best results, I suggest completing both.
What is minifying CSS or JS?
Minifying CSS and JS files are the process of removing things that are not required by the browser.
How to minify a CSS or JS file
Minifying CSS or JS files is as easy as copying and pasting.
Now you should gzip your CSS and JS files.
To learn more about what gzipping is and how to do it, I suggest reading the following article: Enabling gzip compression.
Using a content delivery network (CDN)
A Content Delivery Network (CDN) is the process of using a variety of servers located in locations all around the globe. These servers interact with users based on their geographical location.
Using a CDN can greatly improve your website performance especially if it serves customers globally.
For example, if someone from Germany is visiting your site the browser will download the content from a server based in Germany.
One of the drawbacks of using a CDN is that they can be pricey.
I use one for free which comes as part of my hosting package (another advantage of using a more expensive hosting solution).
I hope you have found the information on this page helpful.
If however, you have any further questions, don’t hesitate to get in touch.
Please note: Any link that I have provided within this post has been added solely to help you in your quest to make your web page faster.
I have no affiliation with any of the companies.