groveslatebrowse.com logo Visit

How resuming an interrupted download works

Why some downloads continue where they stopped and others start again from zero, what the server has to support, and what to try when a resume fails.

3 min read

Network cables plugged into a numbered patch panel

A 4 GB disk image is at 80 percent when the laptop goes to sleep or the router restarts. Whether you lose a few seconds or the whole hour depends less on the app you use than on the server sending the file. Here is what happens behind a resume, and what to do when it doesn't work.

What a resume actually asks for

A download manager writes the file to disk as it arrives and keeps a note of how many bytes it already has. When the connection comes back, it sends a new request with a Range header that says, in effect, "send me everything from byte 3,400,000,000 onwards". If the server supports this, it answers with status 206 Partial Content and only the missing part. If it doesn't, it answers with a normal 200 and the whole file again, and the app has no choice but to start over.

The same mechanism lets a download manager split one file into several parts and fetch them side by side. A server that refuses ranges therefore blocks both resume and split downloads.

How the app knows the file hasn't changed

Joining old bytes to new ones only works if the file on the server is still the same file. Servers usually send an ETag or a Last-Modified date, and a careful client sends that value back when it resumes. If the publisher has replaced the file in the meantime, the server sends the new version in full instead of a mismatched tail.

Common reasons a resume fails

  • The link has expired. Many download pages hand out a signed address that stops working after a few minutes or hours. The bytes you have are fine, but the address no longer is.
  • The server doesn't accept ranges. Some small sites, and scripts that build files on the fly, always send the full file.
  • The file sits behind a login. The request may need the browser's session cookie, which the app may not have after a restart.
  • The partial file was moved or deleted. Disk cleanup tools sometimes remove temporary files, and the app then has nothing to continue from.

What to try when it won't resume

Go back to the original download page and start the download again from there. Most download managers let you refresh the address of an existing entry, so you can paste or catch the new link and keep the bytes already on disk. Look for an option called something like "refresh link" or "change address" in the item's menu.

If the app shows that the server does not support resume, there isn't a setting that can change that. For a large file from such a server, it helps to start it at a time when the connection is least likely to drop, and to stop the computer from sleeping until it finishes. Our note on scheduling large downloads overnight covers the sleep settings.

After any download that was interrupted and resumed, compare the file's checksum with the one the publisher lists. It takes a minute and confirms that the pieces were joined correctly. The steps are in how to verify a SHA-256 checksum.

Where to go next

Try pausing and resuming one large file from a site you use often, so you know whether it supports ranges before you depend on it. If you want an open-source app to test this with, AB Download Manager is one option; its official site lists the systems it supports and how to install it.