Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

Stop downloading PDFs and making URLs hard to find

  • 4 답장
  • 1 이 문제를 만남
  • 95 보기
  • 최종 답변자: 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!

선택된 해결법

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.

문맥에 따라 이 답변을 읽어주세요 👍 0

모든 댓글 (4)

more options

선택된 해결법

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.