Explore BrainMass

File Size Considerations in Web Design

Discuss the ways in which you can optimize a file in order to reduce file size and maintain quality. What factors would you consider?

Solution Preview

When a web page loads into a browser, it brings with it the content, the structural format code that holds the content, the CSS (style sheets) instructing the browser how the content should look and be arranged, the images within the content, and any scripts, frames, iframes, and other pieces of code that "brings" content to a page. Every character on a page, every < tag, colon, quote and equal sign - these all add up. For example, here is a breakdown of one of our web pages with six graphics on it:

Content Size
Total 175K

The average base page, according to experts, should be about 30K, and grow to about 60K with all the graphics and scripts added in for the best loading speed, though less is always best. This page is way over the limit! So how do you get that number down?

I. Eliminate spaces
Often when writing articles and content in word processors and pasting the information into the HTML page, spaces are created at the end of paragraphs. If your web page editor permits multiple page search and replace, search and replace for _</p> (space then tag) to </p> (no space just tag) and see how many are found. With our over 400 web pages, some studies found and replaced over 49,500 spaces. This comes to just over 49K bytes of wasted space, but it still adds up. Spaces between tags are usually invisible on the screen, but they take up space. Check for spaces between " >" and " <" and see if they can go (be cautious of links next to links or code next to code as they will squish together with this search and replace). While empty ...

Solution Summary

The ways in which one can optimize a file in order to reduce file size and maintain quality are described.