How to get a warning from Firefox before you close when downloads are in progress?

Solution 1:

Try to set the value of browser.download.manager.quitBehavior at Firefox about:config. It can be set to these values. To get a warining you should set it to 2.

Source: support.mozilla.com

Solution 2:

I'm using DownThemAll! addon and even if I close Firefox, the download window remains open as a separate window. This prevents me from stopping my unresumable downloads accidentally.

Solution 3:

You may also want to consider to set browser.warnOnQuit and browser.showQuitWarning in Firefox's about:config to true to get a warning when closing the browser, not only when a download is in progress. This might save you some headaches when you accidentially try to close Firefox and were typing text into some input boxes for example. See http://kb.mozillazine.org/Browser.warnOnQuit.

Solution 4:

Actually, browser.download.manager.quitBehavior doesn't exist anymore; it has been removed in recent FF versions.

One (slightly clunky) workaround is to go to Downloads -> Show all downloads when you're downloading something big you may forget about. It will show a new download window, independent from FF. But you have to remember beforehand.

The missing preference is just screaming for a bug report, though.