While it's true that the typical user's bandwidth has grown significantly in the recent years, the bandwidth nevertheless remains a constant issue for web developers. However, many developers don't realize that there are actually two main sources of bandwidth problems. The first of these is fairly obvious: forcing your users to download files that are too large. But, there is also a second, less obvious source: forcing your users to download too many files at once.
Let's start with the obvious source first. If the files that your users need to download are too large, it doesn't matter whether they are images, videos, or JavaScript code files: Your site is going to load slowly. However, you can make a big difference in the size of any file you use by enabling compression at the web server level. On an Apache web server, this can be done by using mod_deflate
, and most other web servers have similar options. Doing so will...