Bandwidth optimization
Bandwidth optimization is one of many concerns webmasters deal with when hosting web content. Since most web hosts charge by bandwidth used or have an account limit on bandwidth, a prudent webmaster will squeeze and compress their files as much as possible without impacting the content's integrity.
Even the simplest bandwidth optimization techniques can reduce bandwidth costs significantly. Owners of extremely high-volume web services are especially diligent, and have been known to employ extreme techniques to save a few bytes per page. For example, many staple pages at Yahoo are highly optimized - with whitespace and line breaks removed, unneeded quotes removed around HTML attributes, and images compressed to the limit while maintaining clarity.
Most bandwidth optimization techniques can fit into one of three categories: Efficiency, Compression, and Omission.
Efficiency
Efficiency techniques involve changing the web content in order to minimize the number of bytes that need to be sent. For example, use external files (which will cache) instead of inline styles and scripts, reuse icon images, use semantic markup. Fix any broken images, since these often send a verbose 404 error page.
Compression
use compression on the server to squash files before they are sent. Compression is a well-established technique in telecommunications, since without significant bandwidth compression, the telephone grid could not handle the amount of data that passes through it. On the web the most most popular compression algorithm for real-time compression is GZIP. The topic of compression also includes image compression e.g. JPG, PNG, GIF
Also see WAN Optimization
Omission
omit unneeded bytes. remove comments, whitespace, and don't send
tags to non-robots.