HostingGreen web hosting packages
TutorialsBeginners guides to SEO & hosting
Beginners guide to Web Hosting
Factors dictating website loading speeds
To better have an understanding of what dictates the speed of a web page loading, lets have a look at the process that happens when an address is typed into the browser.
- lookup – First of all a DNS request has to be made against the name. For example, www. -hat.com will request the DNS and return an (which look like a series of four numbers separated by dots, in this case 188.8.131.52). This contains the address of the web server that will host the page that is requested. The speed at which the DNS lookup is achieved (DNS request) is the first factor we need to examine, since nothing else can happen until the IP address is obtained.
- Server response time – Once we have the IP address a request from the broswer to the web server is made for and the web server should respond with the html code for the page. The speed of the response of the web server (HTTP request) is the second factor in our equation.
- Download time – The html file will take some time to download to the browser and this is dictated by both the web server and the user’s internet connection. Since nearly all web servers are on a much higher than a user’s connection this is normally out of your hands- you cannot control how a visitor connects to the internet! The only time that this may be an issue is if you are serving your website from a local computer and then your connection would be the one slowing it down… but this is such a bad idea for so many reasons we will assume that you are not doing this.
- Processing by the browser – The browser must then go through the html and work out what further information it needs, extra css or script files, images, flash content etc. It will in turn make further requests to the server for each item that it needs and so the process starts again for each of these items. The browser can be requesting more than one item at a time (if the page is structured correctly) and so there are four factors here: the number of http requests that are made, the size of these requests in terms of file size, whether or not further DNS requests are to be made and the structure of the html to enable mutilple requests to be made in parallel.
The rest of this tutorial will be discussing simple ways to optimise the factors above, reducing the time at each stage to produce a much faster end result.
Before we move on to the first practical step there is one factor that will affect all of the other steps- your DNS and web server response speed. Cheap hosting is made cheap by cramming more websites onto a single machine which means that the processor has to do more work. The more sites means the slower that the server will respond to each request and this will have an affect for every DNS and web server request made (and even optimised pages can have more than 10 requests for each page). To learn more about getting the correct hosting for your website, please read our beginners guide to web hosting.
Next section: Fewer DNS and HTTP requests
Index of all our tutorials: Wight Hat tutorials