Improve the Performance of Your Website

It's easy to think of ones website as complete but there will always be things to optimize in order to make it perform even better. Actually there are hundreds and yet another hundred of things that can be done to make it the best site on the web. You usually say that there are three different areas that you should take a look at: front-end performance, hardware and server-side scripting optimization. Even though all of these areas should be overlooked we'll in this article put our main focus on the front-end performance since it will be the easiest one for you to work on and optimize.

Reduce the Amount of HTTP Requests

If you want faster pages you will have to reduce the amount of components that are on the page. This could for example be Flash, images, scripts and stylesheets - just to mention a few. There are obviously much more that could be removed and we would recommend being meticulous when doing this.

If you take a good look at your site we're sure that you'll be able to find things that could be removed. When components such as the mentioned are reduced you will cut down on the number of HTTP requests and therefore making your site faster.

Content Delivery Network - Use it at All Time

A CDN is a number of computers/servers that work together to transparently deliver content to end users. With the help of a CDN you will be able to improve scalability, performance and it will also cut down your costs.

Since you use multiple servers the pages will load much faster, pleasing the visitors. As much as 80-90% of the end-users time is spent downloading pages so everything that can make the experience quicker will be a thing of good.

Use an Expires Header or a Cache-Control Header

Depending on whether it's for static or dynamic components you should use either an "Expires" header or a "Cache-Control" header. Nowadays web pages are getting richer and richer when it comes to subjects such as Flash and images on the site. For a first-time visitor it will mean having to make several HTTP requests.

With Expires headers you make the above mentioned components (and more of course) cacheable, thus making HTTP requests redundant on following page views. Browsers, as well as proxies, use a cache which makes it much faster to load web pages.

Gzip Components and Speed Things Up

There's absolutely nothing you can do about the end-users bandwidth speed but there are other variables that you can modify to speed up the response time. "Gzip-ing", or compressing, your files will trim down the size of the HTTP response with about 70%.

Almost all of today's traffic on the Internet travels through browsers that claim they support Gzip. There have been some bugs with Gzip and browsers but fortunately that above all goes for the older browsers that now more or less are being discarded.

Put Stylesheets at the Top of Your Page

To avoid two problems, Flash of unstyled content and a blank white screen, there's one thing you can do - put stylesheets at the head of your page. Say that you have a page that is crammed with a lot of content and your visitors have a slow Internet connection - then putting stylesheets to the head document at least makes the site appear to be loading quickly even though it might not be any quicker at all.

Put Scripts at the Bottom of the Page

Putting scripts at the bottom of your site will, once again, avoid the problem with a blank screen and delayed downloads, since parallel downloads gets blocked by scripts. It's not always easy to move a script to the bottom.

Say that the script uses document.write to include part of the page - then it can't be placed at the bottom of the site. Perhaps you could try using deferred scripts as this might solve the problem.

Save Images in the Proper Format

Some sites are crammed with images and if they're crucial for the page you probably should keep them- if not take them away and you'll get a faster website. Three different formats are often used: JPEG, GIF and PNG. When you have images picturing "realistic" objects you want them in the JPEG format and pictures with solid colors such as logos and charts should be in the format of GIF or PNG. Images will get various results in color and quality depending on what format they are saved in.

Minify JavaScript and Improve Load Time

Improving your load time will be a good thing for you as well as for your visitors. To succeed in this you should minify the JavaScript - which in other words means taking away redundant characters from code. Don't forget that also characters such as new line, tab and space ("white space characters") counts as redundant characters and are therefore to be removed to speed up the response time. There are tools that you can use to simplify your work and two of the most popular are YUI Compressor and JSMin. Use these and save a ton of time.

Avoid Redirects at all costs

One of the easiest ways of avoiding slow pages is through keeping away from redirects. As you insert a redirect between a user and HTML document you'll obviously also will slow the process down. Not a good thing at all if you ask us.

If you have to do a redirect we would have to say that the preferred technique would be the standard 3xx HTTP status codes. Remember though that you should only use redirects if really needed - try to avoid it.

Remove Duplicates Scripts

This might seem as a very obvious point but still we see several sites using duplicate scripts. A duplicate script will hurt the performance of your site since it'll lead to completely unnecessary HTTP request that will do no good. These no-good duplicate requests happen in Internet Explorer and not in Firefox. Remember though that there are still a lot of people that use Explorer (for reasons that we can't figure out) as their main browser when surfing the web and you obviously want as many as possible to experience your site as top performing.

Written by David Walsh


David Walsh is currently working in the online industry and will continue to write articles for us on all sorts of hosting related topics. On his spare time you can find him thumbing through old records or preparing a good meal in the kitchen. Make sure to also visit his blog here at!

Written 2009-01-20 (Updated 2016-10-10)
Share your thoughts

John,  18 February, 2009

Some good in this article!

Show all related articles..

Overall Best Web Hosts

Buying Guide

Are you finding it difficult to understand what type of hosting you need or which provider to go with? Go through our guide and find the best solution


User Reviews

Make your voice heard! Rate and review your web hosting provider - good or bad, we want to know

Everything has been very stabile and I was very impressed with all the features and extras that were included in the plan.

Bill about iPage

Read iPage Review

Why wait? Get today's best deals now!