6 Different Ways To Decrease Your Page Load Time

March 12, 2010 by  

On a 56k connection a Webpage should load within 8 seconds. The following things are all ways you can speed up your page load time.

1.     The bulk of WebPages that contain JavaScript load them in at the start of the document.  Owing to this until the JavaScript is has loaded in the page can’t be seen. If the JavaScript is placed at the end of the document the page content will load first which will chop some of the load time. The page will still be loading when it is viewable within the browser but the user will be oblivious to this.

2.     Loading in external documents such as style sheets or JavaScript files can also increase a page’s load time. If you include the external files within the main html file it makes the code less readable but it also decreases the load time. When you’ve got your website functioning correctly, take some time to copy paste external code into the main html file.

3.     There are several different image formats, the most common are Portable Network Graphics (png), Joint Photographic Experts Group (JPEG) and Graphics Interchange Format (gif). Being careful you use a format that retains the quality of the image at an optimal size is vital when it comes to page load time. A gif type image is the smallest format so if your graphics only contain a few colours then this would be the primary choice. JPEGs can be adjusted to vary in quality, you should aim for the lowest quality possible without compromising the quality of the image. PNGs can provide images with transparent backgrounds but have a larger file size than the two previous types. An additional image format is Bitmap (bmp), which are very large files that retain the full quality of the image. These should be avoided altogether for web use to guarantee speedy page load times.

4.     A minimal use of images, in particular animated gifs will also decrease page load time. Animated gifs are made up of more than one graphic and therefore have a greater file size. Lower file sizes of graphics will decrease a page’s load time. The amount of images being loaded is also worth noting as it also effects page load time.

5.     Flash animations or swf files are used more frequently these days than animated gifs. However they’re file size is significantly bigger than that of animated gifs. They should only be used on a page where absolutely essential. It is worth considering using an animated gif instead of a swf if your animation is short and doesn’t require any user interaction. Nevertheless it should also be understood that if your animation uses audio a gif won’t be an option. The use of swfs will also require extra code to check if the user has a flash player installed. Further code equates to a bigger file size and is therefore another reason to only use swfs where necessary.

6.     It is advisable to combine separate images where you can to lessen page load time. The overall file size of two separate graphics will be more than that of one. Also with only one graphic the page needs to make less http requests, which is another determining factor of page load time.

 

Comments

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.