Firefox 31 steals the pdf file association


Firefox uses the builtin pdf.js to display PDF documents when you click on a link that points to a PDF file.

"pdf.js is a JavaScript library intended to render PDF files" (Wikipedia).

It was included in Firefox in version 15, and is enabled by default since version 19.


Mozilla planned to let Firefox declare itself the default handler for pdf files only if there is no other handler installed yet.

Current state

Firefox 31 does in many cases declare itself the default handler for PDF, although another program already is responsible for pdf, even if the original Adobe Reader is installed.

Comment 3 of bug 1049521 suggests that the issue is related to windows having different defaults: One global default setting for all users, and an indivivual one for each user. Adobe Reader sets itself default for all users, Firefox appears to check only if a pdf handler is declared for the current user, under which the installer is being run.


One way to prevent this from happening during install seems to be to manually declare Firefox the default browser for all users, and then forbid it to ask every user to make Firefox default for that user. This also stops it from making itself the default for pdf.

To do this, remove the checkmark when the installer of Firefox asks to make itself the default, later run the helper.exe command from the uninstall directory with the command line option /SetAsDefaultAppGlobal, and add this line to your autoconfig file:
pref("", false);

Do not just run the helper.exe without options, this would uninstall Firefox. Cut and paste this into a file named SetFirefoxDefault.cmd, then double-click that file:

set progdir=%PROGRAMFILES(X86)%
if "%progdir%"=="" set progdir=%PROGRAMFILES%
"%progdir%\Mozilla Firefox\uninstall\helper.exe" /SetAsDefaultAppGlobal

If the icon of this file looks like from a text file, then the settings of your Windows Explorer do not allow you to to rename it to cmd, it always adds txt to the name without showing it.

Modified Registry Keys

Firefox overwrites this registry key:


From there it travels to HKCU\Software\Classes\.pdf of each user.

If you have Adobe Reader 11.0.10, that registry key should instead look like this:

"Content Type"="application/pdf"






Howto Disable PdfViewer in Firefox

I recommend to completely disable PDF.js, because it is slow and buggy, and because I do not like the idea to code highly complex tasks in javascript, if there are already very good native programs available for that task:

pref("pdfjs.disabled", true);
pref("plugin.disable_full_page_plugin_for_types", "");