Live data from Hacker News

“Right click and save as” needs to go away

svarden.se

171–180 of 194 posts

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

#171
post #165

Note that the "download" attribute is extremely useful when the href is a data or blob URI [1]. This allows you to construct the file that the user is going to get in Javascript, rather than server-side. For example, if you wanted to write an image-editing web app and didn't want to round-trip to the server to allow them to download a copy. https://en.wikipedia.org/wiki/Data_URI_scheme

Yeah, this is useful. You can generate the URI in a click handler as well, so if you need to do some last minute assembly it still seems to work like a regular download link.

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

#172
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.

I'm quite fond of muPDF, although it definitely leans towards the minimalist.

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

#173
> Firefox quirk - When specifying a value for the attribute, Firefox will not automatically give the file the correct file extension like Chrome does.

I think the quirk is the other way around. I always dislike it when Chrome suddenly decices to add a ".txt" extension to the file I've just downloaded. It sometime even does this .js files.

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

#174

> Firefox quirk - When specifying a value for the attribute, Firefox will not automatically give the file the correct file extension like Chrome does. I think the quirk is the other way around. I always dislike it when Chrome suddenly decices to add a ".txt" extension to the file I've just downloaded. It sometime even does this .js files.

If the files were being served with a text/plain MIME type, it's sensible behavior for Chrome to add .txt, and it's the site's fault for sending the wrong type info.

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

#175

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…

> What we _really_ need, that we _don't_ have a way to do right now -- is signal the browser to _prompt_ the user as to whether it should be saved or displayed in-browser

Like "right-click and save-as"? I personally don't mind the small choice I get to make when downloading a file.

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

#176
post #136

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.

It's funny how many Windows users seem to think the PDF format is intrinsically slow, and all because of Acrobat Reader. Safari on OS X renders a PDF just as quickly as any other webpage, and always has.

So does Chrome on Windows. Why so much love for Windows users?

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

#178
post #159

Earlier quoted context omitted.

"Before the Chrome save button"? What does that even mean? Half the time I see people praising Chrome it's because of something thoroughly mundane, like an address bar, or saving files, or links . Did you guys browse the web using potatoes before you got Chrome, or what?

It means Chrome comes with a built-in pdf reader that, when you decide to save the file you're looking at, does not re-download it. This is significant when dealing with large files, and not a feature present in all competing products. However, I would recommend re-downloading any pdf files instead of saving them from Chrome's reader, since I've encountered a couple that Chrome corrupted upon saving.

It seems kind of silly that certain browsers download it again. Isn't it stored as temp data somewhere? They should only have to rename it.

I'm actually happy with the way Chrome handles downloads in that it starts the download before you confirm if you want it, then deletes it should you decide you don't. It's cool clicking the "Download" link, navigating to the folder, renaming the file, and seeing the download is almost done.

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

#180

Earlier quoted context omitted.

Yeah, isn't "Content-Disposition: attachment;" header exactly for this?

Content-Disposition can be very useful but it does have some potential security implications: http://www.gnucitizen.org/blog/content-disposition-hacking/

The security implication in this case is not directly related to content-disposition. It could just as well be implemented using the download attribute. The gist of the attack is that it was possible to inject arbitrary javascript into an html file that was downloaded. After opening the file locally, the usual browser protections do not apply since it's a local file and the javascript can use this to escalate its privileges.
Post reply on HN