Die Funktionalität dieser Website ist durch Wartungsarbeiten eingeschränkt, die Ihr Erlebnis verbessern sollen. Wenn ein Artikel Ihr Problem nicht löst und Sie eine Frage stellen möchten, können Sie unsere Gemeinschaft über @FirefoxSupport auf Twitter, /r/firefox oder Reddit fragen.

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

Stop downloading PDFs and making URLs hard to find

  • 4 Antworten
  • 1 hat dieses Problem
  • 1 Aufruf
  • Letzte Antwort von cor-el

more options

Firefox Developer Edition 85.0b4, macOS 10.15

If I Google for a PDF and click a link, I get the Firefox download dialog. If I select "Open with Firefox [Developer Edition]", the following things happen:

  • The PDF is downloaded to ~/Downloads
  • The PDF is opened in a new tab, with that new tab's location bar holding a file:///... URL to the downloaded PDF

What I would instead like to happen is:

  • The PDF is downloaded to some temporary directory where I won't have to worry about deleting it manually
  • In whatever tab the PDF is displayed in, the location bar contains the URL where the PDF was (temporarily!) downloaded from

How can I achieve this?

Not having the URL where a PDF was opened from is very annoying when, for example, I open a bunch of PDF search results to read and review, and I later want to share links to some of those PDFs. Best I can do to find their URLs to give to others is then to try and remember which tab corresponds to which search result, or do mine the downloads tab.

Contrast this with Chrome: I click a Google result for a PDF and the PDF just opens in the current tab with the URL to the PDF in the location bar. No dialogs, no PDF files hanging around in my home directory, and I can just copy the URL to the PDF the same way I'd copy the URL to any web page.

Thank you!

Firefox Developer Edition 85.0b4, macOS 10.15 If I [https://www.google.com/search?q=facebook+and+the+future+of+fair+housing+online+filetype%3Apdf Google for a PDF] and click a link, I get the Firefox download dialog. If I select "Open with Firefox [Developer Edition]", the following things happen: * The PDF is downloaded to ~/Downloads * The PDF is opened in a new tab, with that new tab's location bar holding a file:///... URL to the downloaded PDF What I would instead like to happen is: * The PDF is downloaded to some temporary directory where I won't have to worry about deleting it manually * In whatever tab the PDF is displayed in, the location bar contains the URL where the PDF was (temporarily!) downloaded from How can I achieve this? Not having the URL where a PDF was opened from is very annoying when, for example, I open a bunch of PDF search results to read and review, and I later want to share links to some of those PDFs. Best I can do to find their URLs to give to others is then to try and remember which tab corresponds to which search result, or do mine the downloads tab. Contrast this with Chrome: I click a Google result for a PDF and ''the PDF just opens in the current tab with the URL to the PDF in the location bar''. No dialogs, no PDF files hanging around in my home directory, and I can just copy the URL to the PDF the same way I'd copy the URL to any web page. Thank you!

Ausgewählte Lösung

Sigh. It appears the problem was one or both of the following preferences:

  • pdfjs.enabledCache.state: false
  • pdfjs.migrationVersion: 2

I deleted both, and now clicking on a PDF just opens in the sane, normal way in Firefox that I desire.

Naturally I have no idea how those got set.

Diese Antwort im Kontext lesen 👍 0

Alle Antworten (4)

more options

Ausgewählte Lösung

Sigh. It appears the problem was one or both of the following preferences:

  • pdfjs.enabledCache.state: false
  • pdfjs.migrationVersion: 2

I deleted both, and now clicking on a PDF just opens in the sane, normal way in Firefox that I desire.

Naturally I have no idea how those got set.

more options

Note that this is supposed to happen if you use "Open in Firefox" to open a PDF in Firefox instead of saving the file or open the file in an external application (PDF viewer). This causes the file to get downloaded to the temp folder and the resulting file:// link to the file in the temp folder is opened in a Firefox tab. This still creates an history entry that has the URL where you downloaded this file, so you can check the history from around the time you looked at this file..

more options

cor-el said

Note that this is supposed to happen if you use "Open in Firefox" to open a PDF in Firefox instead of saving the file or open the file in an external application (PDF viewer).

Understood, thanks. After I deleted my pdfjs.enabledCache.state=false pref, I stopped even getting a dialog: clicking on links to PDFs where the server doesn't force download now just shows the PDF right in the tab, with the remote URL in the location bar, just like I expected. No more downloading.

more options

Firefox should open the PDF file in a tab if the server sends it as "application/pdf". If the file is send as a generic type like "application/octet-stream" or send as "content-disposition:attachment" then you get the choice in the download dialog to open the PDF file in Firefox. In case you choose the latter then you get the described behavior with getting a file:// link to a file in the temp folder.