We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Ce site disposera de fonctionnalités limitées pendant que nous effectuons des opérations de maintenance en vue de vous proposer un meilleur service. Si un article ne règle pas votre problème et que vous souhaitez poser une question, notre communauté d’assistance est prête à vous répondre via @FirefoxSupport sur Twitter, et /r/firefox sur Reddit.

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

when i open pdf firefox ALWAYS asks what to do

more options

Firefox just updated, without my permission, which is another problem. But now when i try to open pdf files, firefox always ask what to do. In Options > General > Appliacations i set pdf files to open with firefox, but firefox still asks what to do. In the window where it asks what to do, there is a tick box saying "Do this automatically from now on", even if i choose that option it still ends up asking what to do the next time i open a pdf file.

Firefox just updated, without my permission, which is another problem. But now when i try to open pdf files, firefox always ask what to do. In Options > General > Appliacations i set pdf files to open with firefox, but firefox still asks what to do. In the window where it asks what to do, there is a tick box saying "Do this automatically from now on", even if i choose that option it still ends up asking what to do the next time i open a pdf file.

Solution choisie

Sorry to make this complicated, but always doesn't mean always because...

When you open a link to a PDF, three things can happen:

(1) The server allows the browser to retrieve the PDF as web content. Firefox will follow your instructions on the Options/Preferences page. If you have Open in Firefox set, Firefox will show the PDF in the built-in viewer (and save the file in the web cache with other files collected during browsing).

(2) The server tries to force the browser to download the file by setting the Content-Disposition header to "attachment". Firefox will show the dialog letting you choose between Open in Firefox, Open (in another app), and Save. (If you choose either Open option, Firefox will save the file in your system's Temp folder.)

(3) The server doesn't indicate that the file has Content-Type application/pdf so Firefox doesn't follow your rules for handling PDFs. Instead you get the standard Download dialog with Open and Save.


I wrote an add-on to work around these issues:

https://addons.mozilla.org/firefox/addon/content-type-fixer/

If you decide to try it, after installation, click its Zzzz button to turn it on. Then click the button again and set the Content-Disposition Override to "Follow my settings (inline)".

As long as the file has a .pdf extension that should work around both #2 and #3.

Lire cette réponse dans son contexte 👍 0

Toutes les réponses (1)

more options

Solution choisie

Sorry to make this complicated, but always doesn't mean always because...

When you open a link to a PDF, three things can happen:

(1) The server allows the browser to retrieve the PDF as web content. Firefox will follow your instructions on the Options/Preferences page. If you have Open in Firefox set, Firefox will show the PDF in the built-in viewer (and save the file in the web cache with other files collected during browsing).

(2) The server tries to force the browser to download the file by setting the Content-Disposition header to "attachment". Firefox will show the dialog letting you choose between Open in Firefox, Open (in another app), and Save. (If you choose either Open option, Firefox will save the file in your system's Temp folder.)

(3) The server doesn't indicate that the file has Content-Type application/pdf so Firefox doesn't follow your rules for handling PDFs. Instead you get the standard Download dialog with Open and Save.


I wrote an add-on to work around these issues:

https://addons.mozilla.org/firefox/addon/content-type-fixer/

If you decide to try it, after installation, click its Zzzz button to turn it on. Then click the button again and set the Content-Disposition Override to "Follow my settings (inline)".

As long as the file has a .pdf extension that should work around both #2 and #3.