← Back to context

Comment by edflsafoiewq

1 day ago

I'll try this.

The way I have to resume downloads in Firefox is

1. Move the .part file to a temp file

2. Start the download again; a new .part file gets created

3. Pause the download

4. Move the temp file to the .part file, overwriting it

5. Unpause the download; it resumes from where the old .part file stopped

This is only necessary if a "one-time" download link gets interrupted part-way through, eg. by a flaky connection. Attempting to resume a one-time link like normal gets (I assume) a 400 response and FF kills the .part file.

That’s like trickery anno 2002. How come this hasn’t been solved in the last decades?

  • I remember this was one of the killer features of Netscape! It was a browser with resume built in! Pretty funny, considering Firefox is a descendant of that browser.

  • I've been using FreeDownloadManager in Windows for over a decade. So it's been solved just no one cares I guess?

    • I used to use GetRight to download big files over FTP or HTTP, over dialup. You could set it up to automatically re-dial your ISP if you got disconnected halfway through a download. And you could download a file in multiple "threads" - for example, get 2 concurrent HTTP sessions downloading the same file, one thread starting from the start and a second thread starting halfway through the file.

      GetRight did all this in 1997.

      6 replies →

  • I think it's because there isn't a robust way to ensure a file is only downloaded once when you have special cases like interrupted transfers and/or range requests.

  • It was solved long, long ago. You used a download manager, often a browser plugin. They were easy to find.

    They're not easy to find now because the demand for resuming an interrupted download dried up.

  • Mozilla has been working on rounding corners. Only nerds use the internet for downloads so it is not their main audience. /s

One caveat with that trick: if the server picked a different file or the link now points at a new version, Firefox will happily splice the old .part onto the new bytes and you get a corrupt file with no error. Resume requests only check the range, so unless the server returns an ETag or Last-Modified that matches, nothing guarantees the two halves belong together. Worth checking a hash afterwards if the source publishes one.