every now and then, i receive enquiries regarding speed of web page loading.
recently a client emailed me asking why their page had been very slow to be displayed, and his is in singapore. server load is fine. i myself felt that his page was indeed rather slow, although not using database, no java applet, no scripting, just static html, not very graphic intensive – in the surface.
when i looked at his files, the only image on the page was unbelievable 800+kb in size, while the html file itself was 200kb+. that’s 1MB+ data for one simple page, how can the page be loaded fast? it may take a few minutes to download if visitor is using dial-up, although not many people use dial-up.
but hey, even for broadband users, 1MB is way toooooo big for a simple web page. it’s very slow, and it wastes your hosting account bandwidth.
so how to make your web site load faster and save bandwidth? before i go into optimized html coding in more detail, let me address two things that might be so obvious that people ignore then often.
first, you have to optimize or compress your images. you cannot take a picture using digital camera and simply put it on your web page. you have to reduce image resolution, compromise image quality, and get optimized image files. the 800+kb image file above mentioned can easily be reduced to 100kb without noticeable quality loss.
if you use photoshop, choose “save for web” option to save the image file. there should be similar functions in other image processing software. or there’re online image optimizers, just search for it.
secondly, use web page authorizing software to code your web pages. i know microsoft word offers a handy function to export word file into html format and it looks fine on web site most of the time. however the problem is, it generates tons of rubbish code. in the example above, the html file can be reduced to 15kb maximum, which means more than 90% of the file is rubbish code.
think about it, and count all pages on your web site. if you do not optimize your html files and images, how much bandwidth you have wasted? and how many visitors you’ve lost because they do not want to wait?
oops, this post became longer than what i expected. will continue in next post.