This is a question we are asked by people on a regular basis: “Why is my website slow?”
It is something that is becoming increasingly important in this “I want it now” world we live in, too, as people are prepared to wait only fractions of a second to be delivered the content they were looking for – slow websites risk seeing the little “x” hit before they ever get the chance to deliver their message!
Worse, search engines like Google know that slow websites are of less interest to the population at large, and so punish them with poor search engine rankings, making your slow website even less likely to reach that Google searcher you wanted to sell your products and services to.
So what can be done about it? And, why is your website so slow?
Well, the answer is usually a combination of things (isn’t it always!). The main things that a website must do have to be considered. When a browser makes a call for a website, the following things take place (this is simplified!):
- Browser asks network “what is at this domain address”;
- Network points to DNS server;
- DNS server routes request to web server;
- Web server renders page (if dynamic) and delivers HTML and files back to the browser;
- Information is rendered by user’s browser into the website you see before your eyes.
There are a lot of steps there, yet this can be achieved on websites Silicon Dales have set up in 0.3 seconds. How? By making each step of the way as streamlined as possible.
The simplest way for you to increase the speed of your pageloads is to make sure the file size is as low as possible – the information being transferred will exit your web server and enter your local machine faster if it is small.
Use Gzip or mod deflate to shrink HTML, JS, and CSS files.
Minify and remove whitespace wherever present to get rid of those unneccessary kilobytes.
Optimize images to make them as small as possible, and serve static content, like images, from a cookieless domain.
Also serve static files from a CDN (content distribution network) to allow multiple elements to download faster – browsers only download so many items from one location, so get things flying along in parallel by serving images, etc, from another domain.
Make your web server faster – by upgrading it – though this (expensive) resort should be a last one!
Use caching across your site. Try things like opcode caching too, with Xcache, APC, and HTTP accelerators like Varnish. If you use WordPress, install, and configure W3 Total Cache.
If your visitors come from multiple countries and continents, consider hosting in the cloud, or co-location, to reduce network latency.
There are more steps that can be taken, but once you have done the above, you should notice some improvement. If you have major problems, and the above looks okay, you could have network issues – make sure your DNS is setup correctly, and, if it is, next consider moving hosts. Try something quick and cheap to setup like Amazon’s AWS to test, if your scripts and websites load quickly there, then your hosting could be the culprit.
We take all of the above steps – and more – for our Enterprise Level clients, to make sure their mission critical business websites stay online, and render faster than the rest. Contact us today if you’d like Silicon Dales to review and quote for development on your existing business website.