PDF Viewing in Browser with Download
As I understand it right now, when I click on a download for a PDF in Firefox, I can choose to open it in Firefox. I like this, and would like to keep it, but my problem is that since it is a preview, it hasn't actually downloaded. The file ends up in Windows' temp folder. I would like it to, when I click open with Firefox, download to my downloads folder, and still open in the browser. Is there a way to do this?
Alle svar (1)
Unfortunately, there is not a convenient way to do that in one step.
This is the standard behavior:
(1) PDF served as web content (Content-Type: application/pdf, Content-Disposition: inline)
Result: Stored in the web cache and displayed in a tab. Or Firefox follows the alternate directions you've set on the Options/Preferences page.
(2) PDF served as a forced download (Content-Type: application/pdf, Content-Disposition: attachment)
Result: Firefox displays the PDF download dialog (Open in Firefox, Open with..., or Save). If you choose either of the Open options, Firefox saves the file in the system Temp folder.
(3) PDF served as a non-specific binary file (Content-Type not application/pdf)
Result: Firefox displays the generic download dialog (Open with... or Save). If you choose the Open option, Firefox saves the file in the system Temp folder.
And these are my thoughts on getting closer to your preferred work flow:
For the #1 case, you could set Firefox to automatically "Save File" for PDFs so that they don't go in the Temp folder. Then you can open them from the Downloads list using the arrow on the toolbar. The steps in this article will get you to where you could set that and see how you like it: View PDF files using Firefox’s built-in viewer.
For the #2 case, there are extensions that can override forced downloading ("attachment" disposition) to turn case #2 into case #1. More on that below.
For the #3 case, I have an extension that detects the .pdf file extension and changes the Content-Type to application/pdf. It can optionally also change the Content-Disposition, so that would change case #3 to case #1.
I suggest experimenting with the setting change first, and if that workflow seems okay, then you could also consider the extension:
https://addons.mozilla.org/firefox/addon/content-type-fixer/
When enabled (click the Zzzz button to wake it up), tick the "Follow my settings (inline)" option on the extension menu:
<center></center>Another extension for case #2 is: https://addons.mozilla.org/firefox/addon/bypass-forced-download/
Ændret af jscher2000 - Support Volunteer den