cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Stop saving PDFs to Downloads when viewing in Firefox

PrimsAlg
Making moves

While this has been shared elsewhere, I can't seem to find any actual response from Mozilla other than "we changed it, and now it's like this". When choosing to open a PDF in Firefox, it now saves it directly to Downloads. I (and it seems like quite a lot of other people as well) need to frequently view a document in Firefox, but I rarely need to save it. If I wanted to save it, I would either choose to save it in the first place or use the download button in the PDF viewer. Now I have to block off part of my week to go clean out all of the PDF garbage that gets thrown into Downloads because Mozilla decided to ignore temporary files as a concept and not provide an option to revert back to the normal behavior. There seems to be no practical reason for this change. Please let Firefox use temp files when viewing PDFs rather than turning everyone's Downloads folder into a trash bin.

39 REPLIES 39

jscher2000
Leader

Would it be okay if Firefox were to use the Temp folder for all the files you open using either --

  • On the Settings page, Applications list, "Use [relevant application]"
  • In the download dialog, "Open with [relevant application]"

-- like Firefox 97 and earlier? Because in that case, Firefox 102 has the update you're looking for. Here's how to get to that setting (this for Windows and Linux users; not for Mac):

(A) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. Please keep in mind that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future.

(B) In the search box in the page, type or paste browser.download.start_downloads_in_tmp_dir and pause while the list is filtered

(C) Double-click the preference to switch the value from false to true (or click the toggle button toward the right end of the row)

If you notice any problems with it, please speak up. I don't think many people are using it yet, so feedback is needed.

 

The trick with "browser.download.start_downloads_in_tmp_dir" seems to work as intended. And it looks like file downloads start in the download folder as intended, not in the temp folder.

I hope this hack will remain working in the future, or Mozilla will revert the automatic download of viewed documents. The new behaviour is extremely messy for people who do a lot of research, be it scientific research or looking up documentations and data sheets. Only a tiny fraction of the viewed PDFs is actually of interest, and I (used to) save these deliberately.

With the new default behaviour of automatically downloading PDFs, the download folder becomes cluttered with garbage. Using the temp directory hack, I have to rely on the system deleting these temporary files. This does not always work as expected and temporary files pile up. Bad, when a lot of big PDFs are involved, because these tend to be rather big.

I also don't understand the rational for the new behaviour. Yes, apparently some people expect to find PDFs in the download folder after closing the corresponding tab. Educate these people by showing a pop-up instead of messing up the download folder for everyone! PDFs are intended for viewing only, just like HTML files. Curious how no one seems to expect HTML files to reside in the download folder after having closed a tab?!

Just wanted to say that I totally agree with you and let Mozilla know that I do not understand why they have made this decision.

Hallelujah!  Thanks jscher2000, your configuration change fixed the issue.

Had been searching for months for a solution.

Thanks, worked for me as well! Such a mess, Mozilla have to fix it asap

Works. Thanks!

Mozilla: make this the default!

Ubuntu user here. The browser.download.start_downloads_in_tmp_dir does not seem to work for me, I open the PDFs with the "system handler" and now they do not open at all. If I want Okular to open them, I have to set this variable to false 😞

I liked it when unimportant PDFs would open in /tmp with Okular, and I would save the important ones where I wanted. Now, my Downloads folder is full of junk that doesn't interest me. Any ideas to improve this, please?

The actual solution (back to old behaviour, and the best IMHO) is to set browser.download.open_pdf_attachments_inline to true in about:config, as you answered lower down in another message.

Thanks again @jscher2000 for the solution 😉

Hello - I made this change to the Firefox config file.   After opening PDF files on several sites, it appears to working nicely to match the way Firefox had been working.   Having Firefox saving PDF files in the downloads folder after specifically changing this in Settings to 'Open Only' has been a major aggravation.   Not sure what precipitated this change but its certainly neither wanted nor desired on my end.   Thanks very much for this much needed fix

JHGrove3
Making moves

It's the worst of both worlds!

It saves it, so I have to go back and delete it later...

AND

It saves it in the WRONG place, so then I have to use the "download this PDF" button anyway and tell it where specifically to save the file.

It's incredibly rare that I want to save a DOCUMENT in the folder for DOWNLOADS. Downloads are almost exclusively installers and executables.


@JHGrove3 wrote:

It's the worst of both worlds!

It saves it, so I have to go back and delete it later...

AND

It saves it in the WRONG place, so then I have to use the "download this PDF" button anyway and tell it where specifically to save the file.

It's incredibly rare that I want to save a DOCUMENT in the folder for DOWNLOADS. Downloads are almost exclusively installers and executables.


There are two intertwined issues here for users who specify "Open in Firefox" for PDFs:

Before Firefox 98, if a site specified Content-Disposition: attachment for the PDF (forced downloading), Firefox displayed a 3-choice download dialog with Open in Firefox, Open with [choose application], and Save file. For both of the Open choices, Firefox saved the file in the Windows Temp or Linux /tmp folder.

In Firefox 98+, if a site specifies Content-Disposition: attachment for the PDF, Firefox auto-saves the PDF file to the "Save files to" folder on the Settings page and then opens the file in a tab. This saves the step of having to interact with the dialog, but many users preferred the Temp folder. Earlier in this discussion you can find the setting to choose the Temp folder.

But!! Why should Firefox save to a disk folder at all just because websites specify Content-Disposition: attachment for the PDF? Why not just save the PDF into the web content cache like sites that do not try to force downloading? So now there is an option for that too:

Here's how you can check on that:

(A) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. Please keep in mind that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future. That said, I use this personally.

(B) In the search box in the page, type or paste browser.download.open_pdf_attachments_inline and pause while the list is filtered

(C) Double-click the preference to switch the value from false to true

Hopefully with some combination of these tweaks you can get Firefox working the way you want. What do you think?

 


@jscher2000 wrote:

Here's how you can check on that:

(A) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. Please keep in mind that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future. That said, I use this personally.

(B) In the search box in the page, type or paste browser.download.open_pdf_attachments_inline and pause while the list is filtered

(C) Double-click the preference to switch the value from false to true

Hopefully with some combination of these tweaks you can get Firefox working the way you want. What do you think?

Here's how you can check on that:

(A) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. Please keep in mind that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future. That said, I use this personally.

(B) In the search box in the page, type or paste browser.download.open_pdf_attachments_inline and pause while the list is filtered

(C) Double-click the preference to switch the value from false to true



@jscher2000  thank you very much! That's definitely the solution to this very annoying issue! Now Firefox behaves as it did before the last updates! This solution will help save a tremendous amount of wasted time for an incredible number of people! Thank you again!

Yes, this seems to work. I set browser.download.open_pdf_attachments_inline to true but left browser.download.start_downloads_in_tmp_dir as false. PDFs now appear in Firefox but don't clutter up my Downloads directory. Thank you jscher2000 and others.

Now if you could ask the developers to stop this obsessive "updating" and "fixing" what isn't broken, that would be great...

Thank you for specificying. I also turned browser.download.start_downloads_in_tmp_dir back to false after setting browser.download.open_pdf_attachments_inline to true, but I forgot mentioning it in my reply 😅

I totally agree with your request for Firefox developer to stop this obsessive release of updates.

For the sake of transparency, I had to set browser.download.start_downloads_in_tmp_dir to true in order to make this work. On Pop!_OS. So it seems like there's inconsistency in the behaviour, which is pretty fun.

It would be better if it were like Linux updates, when the default behaviour is changed during an updating, notify the user and ask the user if they want to accept that change, rather than making them search for a solution.

Hallelujah!  Works great!

Thank you! I love Firefox, but this was getting so annoying I was almost to the point of bailing to another browser.

Thank you so much. This definitely worked in version 105. Now I just have to do it in the 2 other computers I use.

What a pain. Thanks, Mozilla, for adding a new time-waster to my day.

Thank you so much. Content-Disposition: attachment is very annoying and I'm very glad that there is now a way to always let the user decide whether they just want to view the file or save it somewhere.

Thank you! This is exactly what we needed. Would be even better by default.

Perfect, just changing browser.download.open_pdf_attachments_inline did exactly the job I needed and put it back how it was.

Oh my god, I've been unconsciously extremely annoyed by this new behaviour of systematically downloading pdfs over the past year or so, and finally took the time to search about the issue and solve it! Thanks a lot
(note: I had to select "always open with firefox" in the dialog too)
(note2: someone seems to have made an addon: "PDF Inline Display", but the about:config preference works for me)

Finally, finally, it's back as it was, when I now click on the link of a pdf, it just opens in a new tab with the HTTP link of the file in the address bar, instead of the "local" path where firefox decided to save it. I as well need this because I save tab groups quite often; having the address of a then locally deleted file when I try re-opening an old tab-group is of no use at all.
Plus downloading files locks down firefox for 30 seconds every-time, but that's another issue (I have lot's of tabs).

I must admit I used to find ridiculous people complaining about firefox breaking things that work, but now this example has made me switch sides.

grfxguy
Making moves

Longtime Firefox user (since it was Netscape), but this new "feature" could change that. Absolutely HATE the auto download. Major PITA that adds extra work and time for me. If I WANT to save a PDF, I'll d*** well  save it to the RELEVANT FOLDER of my choice, instead of auto-cluttering up my hard disk and having to manually go in and move/rename/delete files that Firefox has decided it should download.

So let's see if I've got this straight.

Using Firefox 105.0.3, I need to add not one, but two additional hacks in order to fix what Firefox broke and restore a workable behavior that sort of mimics how it acted before, then periodically clean out my temp folder to avoid clogging up my SSD. And I have to do that on every computer I have on which I use Firefox. Sounds like a terrific "update."

Classic case of "fixing" what wasn't broken.

longtimeffuser
Making moves

Sorry but if users need to go to about:config to change something to have browser behave like it is supposed to do it sort of makes the browser obsolete and pushing toward another browser which does is more user friendly and is not just checklist of - what can we change to show that we are changing stuff? Less users, less revenue, less money for developers, less users, I do not want to continue.. because I like FF and have been using it for decades but so many little details, changes are really creeping on my patience and that is not unlimited.

oldanalog
Making moves
Why have this box popup:
 
"What should Firefox do with this file?
    Open with Firefox?
    Open with Firefox (default)?
    Save File?"
 
I have not asked or chosen to have every pdf I view to be saved.
Yet, my choice is overruled.
I smell a credibility gap.
 


@oldanalog wrote:
Why have this box popup:
 
"What should Firefox do with this file?
    Open with Firefox?
    Open with Firefox (default)?
    Save File?"

This box appears if you set that content type to "Always Ask" (or if it is an unknown content type). Firefox has always started downloading in the background while displaying this dialog. I don't think there has ever been a way to prevent it from starting the download while displaying that dialog. It was less noticeable when Firefox was using the system Temp folder instead of the Downloads folder.

Kris_s
Making moves

I changed to firefox from chrome for the exact reason that i didn't have to download every single file i wanted to view, up until recently i was able to open PDF's in any software i wanted and still not download the file permanently, it really annoys me that this feature now is gone. Literally my hill to die on in terms of whether or not to use chrome might just switch back now


@Kris_s wrote:

I changed to firefox from chrome for the exact reason that i didn't have to download every single file i wanted to view, up until recently i was able to open PDF's in any software i wanted and still not download the file permanently, it really annoys me that this feature now is gone.


Did you find the solution posted in this thread -- we've had this new option since Firefox 102.0.

When Firefox launches a PDF in an external application, the file needs to be saved somewhere. If you run Windows or Linux, Firefox can be switched back to the Firefox 97 method of using the system Temp folder (or /tmp directory) as follows:

(A) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. Please keep in mind that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future.

(B) In the search box in the page, type or paste browser.download.start_downloads_in_tmp_dir and pause while the list is filtered

(C) Double-click the preference to switch the value from false to true

 

 

I have read all the posts, but to be honest I don't consider this a solution, this is a very poor workaround. i am at this point so sick and tired of all the obnoxious "fixes" to things that really just should be options under "settings". This used to be a standard feature and the very reason I chose Firefox to begin with, now I don't see the point of FF anymore


@Kris_s wrote:

I have read all the posts, but to be honest I don't consider this a solution, this is a very poor workaround. i am at this point so sick and tired of all the obnoxious "fixes" to things that really just should be options under "settings". This used to be a standard feature and the very reason I chose Firefox to begin with, now I don't see the point of FF anymore


They changed it to the Downloads folder because some people lost important downloads when they got cleaned out of the temp folder and, probably, because people got used to how other browsers worked. If this feature is not important enough to you to change the setting through about:config, then don't change it. Totally your call.

Personally, I think it would be great if more of these minor settings could be accessed through the Settings page. I personally can tolerate a lot of clutter, but the user interface designers have strong views about not letting it become overwhelming to the point that normal people can't handle it. At least we have the option, once we find out where it is.

Is there a way to just put pdf files under the UI setting "Save files to:" path when viewing them? I have a specific path set for that that I expect all of my downloads to go to and do not understand why when a pdf file downloads, it doesn't go there?


@Steven097 wrote:

Is there a way to just put pdf files under the UI setting "Save files to:" path when viewing them? I have a specific path set for that that I expect all of my downloads to go to and do not understand why when a pdf file downloads, it doesn't go there?


If you do not select "Always ask you where to save files" then Firefox should use the "Safe files to:" folder by default. Where do yours go?

Note that many sites serve PDFs as web content instead of trying to force a download, so those are saved in the web content cache with pages, embedded images, etc.

Hmm, well that doesn't seem to be the case for me. I do not have that setting selected (please see screenshot). For me, firefox is putting pdfs under c:\Users\<username>\Downloads\<pdfName> This is an example url: http://s3.amazonaws.com/tnmarketing/wwgoa/Small-Keepsake-Boxes.pdf

The response content-type in fiddler is application/pdf.

I am running Firefox 116.0.2 on windows 11.


@Steven097 wrote:

Hmm, well that doesn't seem to be the case for me. I do not have that setting selected (please see screenshot).


Could you experiment with that download path by creating a new folder

E:\FxDownloads

and selecting that as your "Save files to" folder? I'm wondering whether there is a permission problem writing to the root of that drive (or any drive).

I never understood this policy of removing settings. Once familiar with the default behaviour (which should work out of the box of course), all users have their own specific needs, and should be encouraged to make the software behave as they want it, through complete and understandable settings.

If the fear is clutter, simply make an "advanced options for this setting" drop-down submenu where needed (with a button to unroll and re-roll all of them at the top of the page, to have a way to overview everything at once).

Or is there something I'm missing?

james2ugo
Making moves

This is just another example why I think the devs at Firefox are not up to scratch and always making inconvenient and downright illogical changes for the sake of change. Why the hell would they change the temp folder to be Downloads? Does this server any purpose at all except causing clutter and more importantly, a security risk. I know all tmp files are wiped on linux, but download files are kept forever! This is such a horrendous change that I think it's a mistake by Mozilla, no self respecting Dev would think this change is a good idea on any level. I am really sick and tired of so many config changes just to make Firefox behave nicely. Bring back the old configs and settings and just leave us be!

Is there a conspiracy to force people away from Firefox and onto Chr*me? Because I get the feeling Mozilla have been doing everything they can to make the config setting more unmanageable and more rigid, and now Firefox is starting to behave more like Chr*me than Firefox. If I wanted a rigid setup I would go Chr*me. What's the point of Firefox anymore? Sad after 20 years.

Ninetails
Making moves

I did post this in another discussion:

At one point, every time I downloaded the FireFox updates, you kept changing the menus to double spaced. I would then spend my time searching the web for the answers to change it back as there was no setting in FireFox to do so easily.

It was getting so annoying that I started to look at other browsers. Then for a time you left the menus alone.

Then with FireFox 130, you did it again (double spaced menus which I abhor) along with changing the folder where my downloads were sent and opening .pdf's instead of downloading them. I am sure I'll find more things you changed as I go along.

I had spent time setting FireFox up more to my liking and you go and change everything to how you think they should be. So now I spending more time setting it back to my preferences. Could you please keep it in mind to not change peoples personal preferences.

Oh, I see another update (131) is ready to download. What will you have changed this time that I will have to readjust? You want to change something? How about something that helps FireFox stop using my hard drive 100% thereby slowing my computer down.