Home > Articles > Web Design Issues > File Size Issues

File Size Issues

Have you ever stopped to think about the costs of hosting a web site? If so then I wouldn't be surprised if the size of the web space and the extra features that allow you to use CGI came into your head first. Surprisingly the cost of the space and the features are probably one of the smallest costs to the web hosting company, because they only have to pay for the software and hardware once, with perhaps the cost of the engineers to keep it running. The biggest cost to a web hosting company is infact data transfer.

What is Data Transfer?

When people talk about their data transfer they are referring to the amount of data that is transferred from the computer that is hosting their site to everyone that is using it. It includes the downloading of everything that goes to make up the page, including HTML, images, downloadables and sound.

Bandwidth is a commonly misused term that is confused with data transfer; while the two topics are related, bandwidth refers more to how fast the files can be downloaded rather than how much is downloaded. The more bandwidth a site has available, the quicker it can send files to your visitors and vice-versa.

Do not confuse the amount of data transfer or bandwidth your site uses with the amount of disk space that it takes up. Data transfer includes only the files that are used by the person visiting your site. Indeed, it is perfectly possible that a site that uses over 100Mb in disk space can use only 10Mb a day in transfer, and a site using 2Mb of disk space use 50Mb a day.

If a 1kb HTML file is visited 100 times a day, the page itself would use 100Kb of transfer for that day. If the same file had images, each of those would also be downloaded between 0 and 100 times for that day (depending if the visitor loaded the whole page) and the total transfer used by the site would increase by the size of each image (or other file embedded into the page such as a midi or an applet) multiplied by the number of times it was downloaded to visitor's computers.

So why is File Size important

Well, if you visited a site that was cranked up with many animated images, a few Java applets and a midi - would you stay to download it all? Rather unlikely. While this is an extreme example, it illustrates the idea of wasted data transfer quite well. All those files your browser would have started downloading would soon add up - but if no one is staying to watch your Java applet presentation then its just a waste of both your transfer quota, and your visitors time.

You should make a habit of building sites that as small in size as possible (without sacrificing your design of course), even if you don't pay for your web space. Why? Well anyone paying for their web space may have a nasty surprise when their site goes over the data transfer quota - because a lot of hosting companies charge a fee for each space unit you go over the limit. While some of the costs seem relatively inexpensive, they can soon add up - particularly if you are being wasteful with those animated images and auto starting midi files!

Don't think you're safe from thinking about your data transfer quantities if you are hosted on a free server either. If a site gets too popular for its own good they may simply pull it from their server to free up some resources, or make it temporarily unavailable once it has reached its limit or perhaps introduce banners or pop-ups in an effort to recover their costs.

Shaving your File Sizes

If you ever find your site is getting too near its data transfer limit for comfort then there are basically two things you can do to help minimise the effects.

  • Reduce the number of files on your server
  • Optimize your files for use on the web

Reducing the number of files on the server is only really effective in saving data transfer if you make the right choice about which files to delete. Deleting your least accessed files may seem like a logical choice, but if they are only being accessed 2 or 3 times a day then you are not going to make much of a saving. The only way to make any sort of saving is to remove one of the more busier pages - however this could have a big impact on the site. For this reason I would only advise doing this as a last resort and if you don't have the funds to pay for the extra transfer that you need.

The safest way of saving your transfer is to make sure that all your files are optimized for the web, here are a few ideas on how you can save a few extra kilobytes here and there. Remember, any file size savings you can make will add up to be a considerable saving on a busy site!

Optimize your images
Try to use the fewest number of colors possible in your GIFs without loosing too much of the quality. If you use JPG images, experiment with different levels of compression. Using an image optimizing service or tool can help with this.
Potential saving per file: 0-70% of original
Compress your HTML
If you aren't worried about your HTML reaching the latest standards then you can try our tips for HTML compression or use one of the HTML compression tools that are available.
Potential saving per file: 0-25% of original
Sound Quality
If you use midi's and sound files heavily on your site and they are high quality, it may be worth opening them up in suitable editor and experiment with saving them in different formats to see if you can get the same sort of quality by saving it in a different way.
Potential saving per file: unknown (I don't work with sound or midi)
Back to Basics
For each of the most popular pages on your site, decide which features and images your site can and can't do without. For example, if you are using a Java applet to add a special effect, it is most likely for show. Also, if you really must have background music, making it optional will do wonders for your transfer speed, particularly if it is a large file!
Potential saving per file: N/A

Noticed a problem or got a question or comment?


This site will look much better in a browser that supports web standards, but it is still accessible to any browser or Internet device.


About this Page

Author: Rosemarie Wise
Originally Published: Fri 15th Dec, 2000
Last Revised: Sun 9th Dec, 2001
URL: http://websiteowner.info/articles/design/filesize.asp

Want to use this article on your own site? Learn more...


The Web Site Owner's Resource © 2000-2007 Rosemarie Wise