Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More
Open

Stop Auto downloading PDFs

Micah Warren replied
Micah Warren

When I click on a PDF link it will auto download the PDF but then if I click on the same link again it opens it inline. I want it to always open inline and if I wish to save it I'll manually do that.

I've looked around and I found this that mentions using browser.download.start_downloads_in_tmp_dir and browser.download.open_pdf_attachments_inline. While setting the downloads to be in the tmp dir is nice for not clogging up my downloads it still doesn't solve the issue of opening and not saivng. The setting for opening pdf attachments inline sounds like it should fix it but still every time the first time I click it, it starts downloading it.

Is there any other setting that could stop this or some reason why those settings might not apply in all situations?

When I click on a PDF link it will auto download the PDF but then if I click on the same link again it opens it inline. I want it to always open inline and if I wish to save it I'll manually do that. I've looked around and I found [https://connect.mozilla.org/t5/discussions/stop-saving-pdfs-to-downloads-when-viewing-in-firefox/td-p/10225 this] that mentions using ''browser.download.start_downloads_in_tmp_dir'' and ''browser.download.open_pdf_attachments_inline''. While setting the downloads to be in the tmp dir is nice for not clogging up my downloads it still doesn't solve the issue of opening and not saivng. The setting for opening pdf attachments inline sounds like it should fix it but still every time the first time I click it, it starts downloading it. Is there any other setting that could stop this or some reason why those settings might not apply in all situations?

All Replies (4)

This is something the server defines. If it doesn't transfer the PDF in a way that it can be shown as a PDF inline, it's only seen as an unknown download and recognized as viable PDF after it downloads — so that's why you get it previewed just fine the next attempt, it probably uses the cached one it already knows.

So this depends on the headers, media type, transport, compression, content disposition etc. — you'll see differences between different services. If you e.g. open this PDF: static.mozilla.com/foundation/documents/mf-articles-of-incorporation.pdf it shouldn't download anything, and just open.

jbr said

This is something the server defines. If it doesn't transfer the PDF in a way that it can be shown as a PDF inline, it's only seen as an unknown download and recognized as viable PDF after it downloads — so that's why you get it previewed just fine the next attempt, it probably uses the cached one it already knows. So this depends on the headers, media type, transport, compression, content disposition etc. — you'll see differences between different services. If you e.g. open this PDF: static.mozilla.com/foundation/documents/mf-articles-of-incorporation.pdf it shouldn't download anything, and just open.

I forgot to mention that I mostly see this when I first open the browser. So I first tested by opened that link and it opened inline, I then restarted the browser via about:profiles then restart normally and tried again and it still downloaded it on the first click.

Ah okay, that's … wrong. Could you please try restarting into Troubleshoot Mode (from Help menu) to see if there's any interference of an addon perhaps causing this?

I didn't even know there was a Troubleshoot Mode.

Exact same behavior on the link you sent. Starting on this page I left-click the link to the PDF and it opens a new tab and inits the download and then opens the PDF. I then come back to this page and click on it again and it opens the PDF inline in the same tab.

Cuir ceist

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.