2009-01-20

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 WebHostingSearch.com!

Add Your Thoughts

Gravatar

Commented by: John, 18 February, 2009

Some good in this article!

  • creative meeting index
    2012-01-10

    Web Design Trends 2012

    As the new year begins, web designers and Internet users alike are curious about the kinds of web design trends that will gain prominence in 2012. Every new year brings exciting changes to the world of web desig...
  • web programmer
    2011-10-04

    HTML5: The New Placeholder Property for Better Form Instructions

    A coder’s job function is to make a website work properly with the least amount of code as possible. Succinct coding creates efficient, fast websites that are easier to debug if errors occur. Although the Wor...
  • 2011-08-19

    How a Hacker Performs a SQL Injection Attack and How to Protect Your Data

    Hackers use Structured Query Language (SQL) injection to steal or delete data on a database server. In extreme case...
    hacker protection
  • accessible left
    2011-01-11

    25 Ways To Make Your Website Accessible

    As people’s use and awareness of the Web grows, accessibility (or “universal design”) becomes more crucial. Accessibility is determined not only by a website’s code but by its design and content, which i...
  • typography3
    2011-03-28

    Ten Great Fonts and How to Create a Custom Font

    Designing a website consists of tying together a plethora of design details into a single user-friendly experience. One of these important design details involves the font used to communicate the website's conte...
  • silverstripearticle
    2010-12-08

    7 Powerful and Popular Content Management System Options

    CMS (Content Management System) has become an indispensable super-widget for the creation and updating of a professional website with no knowledge of HTML or other code. With a dedicated server that provides exc...
  • 2012-01-23

    40 Amazing Abstract Photoshop Tutorials

    Photoshop is a powerful tool that belongs in any designers toolbox. From the range of photo editing techniques available, to creating website mockups and designs, to making fantastic wallpapers, Photoshop has a ...
  • 2012-01-10

    The 50 Best Linux GTK Themes

    One of the often touted best features of Linux is one's ability to manipulate the system to meet their personal needs and tastes. One of the ways this is done is via themes, GTK being one such variation. For ...
  • 2011-09-01

    30 Web Developer Cheat Sheets

    The list of skills a given web developer must possess is growing everyday. With the massive growth of web technologies, comes the demand for developers with a wide skill set. A useful tool in any developers tool...
  • 2011-07-07

    The Best AppleScripts Speeding up Tasks

    If you are a programmer or have messed around on a Mac for a while, chances are you might have heard of this wonderful little language known as AppleScript. So what is AppleScript? AppleScript is a scripting ...

1 2 3 4 5 6

Overall Best Web Hosts

1. $2.95Review Visit
2. $4.45Review Visit
3. $3.67Review Visit
4. $4.95Review Visit
5. $5.95Review Visit

Buying Guide

Can't decide what hosting is right for you? Answer 2-5 questions and get your perfect hosting match!

To Questions

User Reviews

Make your voice heard. Review your web hosting provider - good or bad.

  •  
  •  
  •  
  •  
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