Closed Bug 1546479 Opened 5 years ago Closed 5 years ago

Problem opening pdf files - Firefox opens new tabs infinitum and can't be stopped

Categories

(Firefox :: File Handling, defect)

66 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 218257

People

(Reporter: acb, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

I open pdf files from a link on a website. This has been happneing for several weeks now. I've tried downloading the latest version again (which I already had) and that has made no difference.

Actual results:

Firefox opens the pdf in a new tab, but then carries on opening it in a new tab for ever, opening hundreds of new tabs. It cannot be stopped, even closing the whole broswer doesn't work as it just reopens itself and carries on opening hundreds more tabs. Task Manager has to be used to stop Firefox altogether.

Expected results:

Open one copy of the pdf in a new tab!

  1. Enter about:support into the location bar.
  2. Click the Open Folder button. This opens a file manager window with your Firefox profile folder.
  3. Exit Firefox.
  4. Back in the file manager window, delete the handlers.json file.

If you get a "What should Firefox do with this file?" dialog and you choose to open with Firefox, that will create an infinite loop. That dialog is for external applications only, and you're not supposed to be able to pick Firefox there [1]. To do that safely, use the Open in Browser extension [2].

The only way to view PDFs in Firefox is to set the action to "Preview in Firefox" in about:preferences. However, servers can still trigger the "What should Firefox do with this file?" dialog, usually by sending the Content-Disposition: attachment header. One way to get around that is the Bypass Forced Download extension [3]. Less commonly, they can also fail to correctly identify the file type by sending Content-Type: application/octet-stream. Extensions like Header Editor can override that [4].

[1] Bug 218257
[2] https://addons.mozilla.org/firefox/addon/open-in-browser/
[3] https://addons.mozilla.org/firefox/addon/bypass-forced-download/
[4] https://addons.mozilla.org/firefox/addon/header-editor/

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Component: Untriaged → File Handling
Resolution: --- → DUPLICATE

Dear Gingerbread Man,

Thank you so much for your speedy and detailed reply. I have carried out your suggestions and it has solved the problem.

I think I must have changed something a while back - it always seemed odd (and annoying) to me that Firefox always opened pdf files in Chrome, which meant opening Chrome every time, and I choose to use Firefox rather than Chrome, so don't want to keep waiting whilst Chrome opens. I assumed that this was an error on my computer, when in fact is seems to be that Firefox doesn't want to open pdf files. I don't understand enough about this to understand why Firefox can't simply open a pdf in a new tab like Chrome does. I have now got it to "Preview pdfs in Firefox" which seems to be much more sensible.

A big thank you once again for your help.

Yours

Andrew Balaam

You need to log in before you can comment on or make changes to this bug.