为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

pdf won't open in new tab without downloading first

more options

I want to be able to preview pdfs in firefox in a new tab without first downloading the file like it used to. But this version (99) of firefox won't allow me to do that. I tried selecting the "action" for pdfs in the applications section of settings to "open in firefox". What it does is preview the pdfs without downloading indeed but it previews it in the SAME tab which makes browsing more difficult. If I select "always ask", and then select "open with firefox" in the dialogue box, it opens the pdf to a new tab alright but it downloads the file FIRST. Is there a way around this please?

I want to be able to preview pdfs in firefox in a new tab without first downloading the file like it used to. But this version (99) of firefox won't allow me to do that. I tried selecting the "action" for pdfs in the applications section of settings to "open in firefox". What it does is preview the pdfs without downloading indeed but it previews it in the SAME tab which makes browsing more difficult. If I select "always ask", and then select "open with firefox" in the dialogue box, it opens the pdf to a new tab alright but it downloads the file FIRST. Is there a way around this please?

所有回复 (3)

more options

dockayku said

I want to be able to preview pdfs in firefox in a new tab without first downloading the file like it used to. But this version (99) of firefox won't allow me to do that. I tried selecting the "action" for pdfs in the applications section of settings to "open in firefox". What it does is preview the pdfs without downloading indeed but it previews it in the SAME tab which makes browsing more difficult.

When you choose Open in Firefox, PDFs are treated as web content, like web pages. So if there is a link to a PDF and you want it to open in a new tab, you need to do the same kinds of things you would do with a link to a web page:

  • right-click > Open Link in New Tab
  • middle-click the link with the mouse scroll wheel
  • Ctrl+click the link

Some sites might not use a link but instead use a button and script to launch the download. In that case, it is more difficult to control and I'm not sure of the best workaround.

By the way, what I do in a situation like that, if I want to have both the new page/PDF open AND the previous page, is right-click the back button and Ctrl+click the previous page on the drop-down to launch it into a new tab.

more options

Thanks Dropa and jscher2000 for the responses. My issue just resolved itself. Firefox might have fixed it on its own.

Thanks for the tips though jscher2000! Learned some new functions with my mouse.

more options

Yes, I forgot to update this thread. The developers fixed it in Firefox 101.

(The reason for the problem was that many sites assign Content-Disposition: attachment to force a download and bypass built-in browser PDF viewers. Firefox 98 started ignoring that instruction, so users would have a consistent experience regardless of how sites were designed. But then users had this "same tab" problem on sites that didn't anticipate this behavior and weren't directing the downloads to a new tab. Firefox 101 now always opens those "forced download" PDFs in a new tab whether the site specifies that or not.)