I HATE sites that force downloading! I often have a 50+ MBit/sec connection and want to be able to choose between having a PDF (e.g. a invoice - all I need is the amount and the bank data) render in the browser so I can discard it after using (here: wiring the money) and not having to do:
1) download it
2) open it
3) do what I want to do
4) delete the file (which requires me to open the download folder, locate the file and delete it).
If I forget step 4, I usually end up with a clusterfuck of a download directory (mine has 20 GB already in half a year, most of it is one-off downloads!).
I don't know what OS you are using, but on linux, I save all of those files to /dev/shm. Since this parks it in shared memory, once I restart my computer at some point, they will be gone. The same can be done by using a tmpfs as your default download destination and a script that cleares any file older than x days etc. I basically use two download folders: ~/Dowloads/* and /dev/shm/; the first is being used for Downloads I'd like to keep, the latter for temporary files.
Browsers (or site owners) could probably do a better job of differentiating links with download attributes. Maybe on mouse over show a little download cursor or something.
In the "old times" Firefox asked me whether I wanted to download and then open, download into temp and then open, or download into a to-be-selected folder; with an addon I could force browse render as an option, too.
Yet, this required two mouse clicks in the "worst case" that the default selection didn't fit.
I think the best solution is: if no download attribute set and Content-Disposition is not "attachment", then render in the browser. If either condition is met, open a popup with large buttons immediately executing the action: download to default folder, download to temp (which will be deleted upon next browser start), download to specific folder, render in browser (if there's a registered handler plugin for this mimetype). Maybe add a checkbox "Open after download has finished", and maybe also add one "Try multi-stream download" (because many sites still limit single-stream bandwidth). Even more maybe, for video files add a "Preview with VLC" and fetch the required parts (header and final part of video) first, so I can stream and keep the file for later usage.
To show an icon on hover over a link on the browser side it would require browsers to make an HTTP HEAD request for each link to see if it has the "Content-Disposition: Attachment" header. That would add a lot of overhead to the page load, so I don't think it would be added to any browser.
However, it seems like a good candidate for a browser plugin for those who have fast connections and don't mind.
Note I said in case the download attribute is set on the link, in which case, no, it would not require any request, it just follows the instructions set in the HTML.
Don't other browsers have a "temporary downloads" folder? For when you select "open this file with (...)" in the download dialog? Opera does.
Now I finally sort of understand why people like opening PDFs in browser plugins, I suppose ...
> I usually end up with a clusterfuck of a download directory (mine has 20 GB already in half a year, most of it is one-off downloads!)
yeah well but that is your own fault for saving temporary downloads in a non /tmp directory. just put them somewhere where they'll get cleaned out every so often. this is a computer, you don't even have to take the trash out yourself, but it's still up to you to differentiate between "to discard" and "to keep".`
But rarely, applications do this. The only notable exceptions is Winrar temp-extractions and some installers. Most other products simply let their stuff rot in TEMP hell.
Actually there are two TEMPs, one Local Settings and one Roaming Settings TEMP. But unlike most linuxes, Windows doesn't clean them, and some applications even fuck up when you delete their temp-stuff.
Yes, exactly this extension I talk about in another reply - but I don't use Firefox any more because it creates disk load and swaps heavily on a 5400rpm disk, and it locks up while waiting for disk i/o every ten seconds (every tab switch, in essence). Chrome's single-process-per-page model is better, because the OS can do proper swapping.
This is true, the cold startup takes longer in Chrome than in FF. But if you're short on RAM (I usually hit 2-3GB usage without a browser running) and the OS starts swapping when you open tabs (I have ~30-40 open regularly), then the difference appears.
1) I don't think your use case / preference is that common. I'd venture that most of the time a download is preferable; I know that's the case for me.
2) Even if I'm wrong about 1), it's hard to argue that there is never a good time to force a download, and so this is a useful feature to know about. I wasn't aware of it so appreciated the post.
I'm almost never on a 50+ MBit/sec connection, which brings up another point. When on a slow, data-capped connection, such as the one I'm on right now, I want to know the size of the file I'm downloading. That lets me decide if it's actually worth spending my precious bandwidth on. If not, I cancel the download. When letting the browser display the file there's no (easy) way of finding out the file size.
From the Firefox normal behaviour, I imagine it would ask you whether you wish to open the file in the OS registered handler or save it. If you tell it to use an external program, FF downloads to temp, not to the Downloads directory.
So, no clusterfuck. Anyhow you are right about the lag caused by downloading the whole file.
The problem is that FF does not read the OS list of programs (or can call the "Use OS selection for program/Open With"), but has "its own source" - on Linux, this sucks, because if I want to specify an unknown program, it's most likely in /usr/bin, which has thousands of files and so blocks the disk for a huge time while reading the file list.
On Windows, it sucks too, because I have to go to c:\, then remember if the program is x64 or x86, then remember the producer of the program, hope the program files-directory is named after the producer or the software, and then find the correct .exe to open. SUUUUCKS.
1) download it
2) open it
3) do what I want to do
4) delete the file (which requires me to open the download folder, locate the file and delete it).
If I forget step 4, I usually end up with a clusterfuck of a download directory (mine has 20 GB already in half a year, most of it is one-off downloads!).