Live data from Hacker News

“Right click and save as” needs to go away

svarden.se

91–100 of 194 posts

Re: “Right click and save as” needs to go away

#92
post #89

Earlier quoted context omitted.

Content-Disposition attachement is one of the hardest things to implement when you have UTF-8 filenames. You have to browser sniff, and even then I have haven't found a good solution. Does anyone know of a good resource that explains all the edge cases that must be handled?

See [1] for a very comprehensive and up-to-date table of browser support for various encoding schemes. See [2] for browser-specific hacks. Summary: most modern browsers including IE9 support RFC2231/5987. (Edit: see my other comment in this thread for IE6-8.) Another option is to leave out the troublesome "filename" parameter altogether and use the last part of the URL to convey the same information, e.g. /files/uplo…

Thanks. These days it looks like a reasonable solution is to just call the file "download.ext" for anything older than IE9.

When I was trying to implement a solution to this problem years ago, what I thought would take 20 minutes of coding, started to look like a week of research and testing, and I gave up.

Re: “Right click and save as” needs to go away

#93

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 fi…

I forget step 4 too, which is why I have a cronjob that moves everything in Downloads to the Trash every day.

Re: “Right click and save as” needs to go away

#94

> There are or course other ways of forcing file downloads, such as adding certain configuration to your .htaccess file, but I think server-side solutions to front-end problems should be avoided whenever possible. I'd disagree with this being a "Front End" problem. You, serving the file, presumably have an idea what you want the user to do with the file. The .html page you propose editing is server side. The file bei…

It's good to see such a comprehensive list, but these only help me if I want to configure download vs view on a per-filetype basis?

There's no way to make some pdfs "display" in the browser and others force download using these headers, correct?

Re: “Right click and save as” needs to go away

#95

> There are or course other ways of forcing file downloads, such as adding certain configuration to your .htaccess file, but I think server-side solutions to front-end problems should be avoided whenever possible. I'd disagree with this being a "Front End" problem. You, serving the file, presumably have an idea what you want the user to do with the file. The .html page you propose editing is server side. The file bei…

> You, serving the file, presumably have an idea what you want the user to do with the file. The .html page you propose editing is server side. The file being served is server side. The server configuration is server side.

The problem is when you want to offer both a view and a download link. Your solution requires offering two different URLs for that, which also breaks caching in the case where a user first wants to view and then download the file.

Re: “Right click and save as” needs to go away

#96
post #46

Earlier quoted context omitted.

Which is funny, because I absolutely loathe opening in the browser, I prefer saving it. Chrome and FF PDF viewers are better, but with Acrobat it was a bag of hurt. Also, see: saving is the more generic answer. Save and you can see it, open it and before the Chrome 'save' button you had to re-download it.

On Windows I've yet to see any PDF viewer that's faster or better than Sumatra. All the in-browser ones are a bit slow and lacking in features.

Try PDF-XChange Viewer.

Re: “Right click and save as” needs to go away

#97
For people that want to test out the download attribute, instead of just reading about it, you try a demo here on your browser: http://davidwalsh.name/demo/html5-download.php

Also, as GavinB suggested for big .pdf and .jpg files, I would would prefer 2 choices,"save" and "view" buttons.

Re: “Right click and save as” needs to go away

#99

There are already ways to force browsers to download using HTTP headers. The author says this is a "server-side solutions to front-end problem", okay. But anyways, when pages use this already, it OFTEN pisses me off, when I want to look at a PDF in browser, but the web app/page is forcing me to save it to disk and then re-open it in another app. What we _really_ need, that we _don't_ have a way to do right now -- is…

Isn't that exactly what browsers ask you when you click in "Save as"? Ok, it's not "display in browser", it's just "display" (or "open"), but what's the difference?

Generally the "open" option opens in some other app, not the browser. Including for formats the browser actually displays better.

Re: “Right click and save as” needs to go away

#100

Earlier quoted context omitted.

>> when I want to look at a PDF in browser > does that ever happen? I do this all the time. I hate downloading crap that I'm probably just going to glance at once then discard.

OK yes I understand better now. I never realized that other browsers apparently don't offer the "open with default application" option in the download dialog, like Opera does. And actually quite some other applications do this (open as a temporary file) as well, it's a very common pattern: 7-Zip, FileZilla, to name a few. And even if you didn't, there's always a temp directory that gets cleaned next reboot. Though I…

Default application, yes. A browser tab, no. When I just want to look at an image, firefox is largely preferable to gimp. When I have a bunch of pdfs, firefox tabs are easier to manage than evince windows.
Post reply on HN