Downloads
Introduction
Many sites contain files for users to download, such as PDF documents or executable files. When making files available to users, it is worth considering how long it will take users to download them. The following table shows minimum download time against bandwidth for file sizes typical of PDF files or small executables.
Download Times
Bandwidth (kbps) | Connection Type | Time for 100kB | Time for 400kB | Time for 1500kB |
---|---|---|---|---|
2000 | Broadband connection in developed world | 0.4s | 1.6s | 6s |
56 | ISDN (dial-up) connection | 14s | 57s | 4 minutes |
20 | Slow dial-up connection | 40s | 3 minutes | 10 minutes |
10 | Heavily shared connection | 80s | 5 minutes | 20 minutes |
There are a number of methods that can be used to reduce the time taken when downloading files.
Reduce the Size of Download Files
Reducing File Size During Creation
When files for downloading are being created, there may be options to reduce the size of the final file depending on the type of file being created. For example, the choice of image formats will affect the size of the image file — see the Images section for more information about optimising images. Where reducing the file size may result in a loss of quality, it is necessary to consider the variety of uses for the file. Different users are likely to be satisfied with differing levels of quality, and it is may be possible to offer different versions of a file with varying size and quality.
Reducing File Size by Compression
After a file has been created, it is sometimes possible to reduce the overall size further by the use of compression, using popular formats such zip, or gzip. There are a number of free tools available to compress and uncompress files in this manner. A compressed file takes some amount of time to decompress for usage, though this is usually trivial compared to the time taken to download the file over a slow connection. Some file formats, for example PDF or most image formats (including gif, jpeg and png), already include compression and further significant savings are not usually possible in this case. If a file is comprised of raw text then it will be possible to achieve significant savings on file size by compressing it. Most users will normally have the tools to uncompress popular formats such as zip or gzip, though it is worth offering both compressed and uncompressed versions of a file to allow for situations in which these tools are not available.
Split Files into Logical Sections
If a file for downloading is made up of sections that can be useful independently, consider making sections of the file available separately. For example, document appendices might be of use to some but not all users who wish to download the main content of a document, or individual chapters of a document may be useful separately.
Show the Size of Files Alongside Links
It is good practice to show the size of files that are available for download so that the user knows what to expect in terms of the likely time to download the file. For example:
PDF Report (237kB)
Enable Resuming on the Web Server
Some users will use download managers to assist them in downloading files. These client-side applications can queue downloads for greater efficiency; pause and resume downloads; recover interrupted downloads without restarting; and schedule downloads, thereby optimising bandwidth usage and reducing costs by downloading during off-peak hours.
Recovering interrupted downloads is particularly valuable in many situations where low bandwidth is combined with unreliability, which particularly affects visitors with high contention on their Internet access and unreliable electricity supplies. When the connection is interrupted, this feature avoids wasting time and bandwidth downloading a second copy of the data already received. It is only possible when resuming is supported by and enabled on the web server or FTP server:
- HTTP servers must honour the Range header defined in HTTP/1.1, and support returning byte ranges
- FTP servers must implement the REST command
Check whether or not your server supports resuming, and if it does, check that it is enabled.
The following web servers all support resuming:
- Apache 1.3
- Apache 2.x
- IIS 4 / 5
- IIS 6
- Apache Tomcat
Consider Alternative Formats
It is recommended that you provide an audio alternative to bulky video files, and text alternatives to both audio and video. This is discussed at greater length in the Multimedia section.
Alternatives to Downloading
For very large files or collections of files intended for public distribution, it may be worth investigating the distribution of the files on CD.
Summary
- Reduce file sizes during creation
- Compress files using tools like zip and gzip
- Indicate file size next to download links
- Enable download resuming on your server