3 ms·
> One note: you might want to put 'download' in the link to the PDF, so it downloads instead of showing up in a new browser window I strongly disagree with thi
by chrismorgan 2y ago
> One note: you might want to put 'download' in the link to the PDF, so it downloads instead of showing up in a new browser window
I strongly disagree with this suggestion. My browser is my PDF viewer, if I want to actually download the PDF I can do it after the browser renders it.
There are precious few situations where <a download> is appropriate for PDF files. This is certainly not one of them. The user probably wants to view the content, let them handle it however.
The experience of PDFs that insist on triggering a download is sufficiently unpleasant that I use a browser extension <https://addons.mozilla.org/en-GB/firefox/addon/no-pdf-download/ https://addons.mozilla.org/en-GB/firefox/addon/no-pdf-downlo...> that removes any `Content-Disposition: attachment` headers, and inserts `Content-Disposition: inline` headers, which in Firefox (but not Chrome, I believe) overrides even an <a download> attribute.
- lurn_mor 2y agoAs the button says 'Download', I expect that result - a download. 'View PDF' would be the appropriate button name in your case... He can put two buttons that distinctly describe the resulting actions.