Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

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

Default behaviour when opening .pdf files

more options

Good morning Mozilla Community,

I have a question regarding the behaviour when opening a .pdf file from web email. We are using FF 68.11.0esr on a terminal server environment and we customize it via config file.

When opening a .pdf or even office docs, Firefox asks what to do with this file. When selected open with Adobe Reader and check mark that it should do this from now on with all pdf files it doesn't do that. The next time when I try to open a .pdf the same dialog window appears again but it remembered the check mark. But it should open the file directly in Adobe Reader without showing the dialog window. I tried to do it in "safe mode" and even "refreshed" Firefox but no improvement.

Does anyone might know why Firefox is not remembering my setting for opening files? See attached screenshots. Thanks in advance for your support in this matter. It is much appreciated.

Good morning Mozilla Community, I have a question regarding the behaviour when opening a .pdf file from web email. We are using FF 68.11.0esr on a terminal server environment and we customize it via config file. When opening a .pdf or even office docs, Firefox asks what to do with this file. When selected open with Adobe Reader and check mark that it should do this from now on with all pdf files it doesn't do that. The next time when I try to open a .pdf the same dialog window appears again but it remembered the check mark. But it should open the file directly in Adobe Reader without showing the dialog window. I tried to do it in "safe mode" and even "refreshed" Firefox but no improvement. Does anyone might know why Firefox is not remembering my setting for opening files? See attached screenshots. Thanks in advance for your support in this matter. It is much appreciated.
Attached screenshots

Chosen solution

Dear Mike,

The bug nummer is 1668182

Read this answer in context 👍 0

All Replies (10)

more options

So usually this happens because the document is being served with the wrong mime type.

This is a case, though, where it might make more sense to open a bug in Bugzilla because the behavior you are seeing seems like a bug.

more options

Thanks Mike,

I reported a new Bug on Bugzilla but I also asked the user to check more .pdf files from different senders to rule the wrong mime type out. If it happens with any .pdf document or MS docs then it might be a bug.

more options

What's the bug number?

more options

You can possibly use the Web Console or Network Monitor to check how the server is sending this file (generic content type like application/octet-stream or content-disposition:attachment.

You can check handlers.json in the profile folder to see what action is stored (Options/Preferences -> General -> Applications doesn't expose the content type).

more options

Dear Cor-el,

In the handlers.json file everything seems to be ok from what I can see. see attachment. Also see the screenshot from the console when trying to open .pdf file

more options

Chosen Solution

Dear Mike,

The bug nummer is 1668182

more options

Also I tried to open the .pdf files with a different Firefox installation but same version and the same behaviour is occurring.

more options

Thanks for opening the bug. That's the best place to have the discussion. Is it ok if I close this?

more options

Hi Mike,

Ya that's fine with me. Thanks

more options

Daniel Gärtner said

Does anyone might know why Firefox is not remembering my setting for opening files?

It's not necessarily a problem with storing your preference. Your preference is not used for every download of a .pdf file -- sites can set two HTTP headers that will trigger the download dialog, bypassing Firefox's automatic handling of downloads:

(1) Content-Disposition

If a server sends a Content-Disposition header set to attachment, which bypasses viewing in a tab, Firefox will always show the download dialog.

(2) Content-Type

The setting on the Options/Preferences page is keyed to the content type application/pdf, not the .pdf file name extension. If the server sends a different content type, Firefox won't use the PDF instructions.

If you would consider using an add-on to address these issues, I have one here: https://addons.mozilla.org/firefox/addon/content-type-fixer/

When enabled (click the Zzzz button to wake it up), issue #2 is handled automatically. To address #1, tick the "Follow my settings (inline)" option on the extension menu:

<center></center>