How to open ALL PDF links in a new tab in Firefox? #21869
|
Here is the file, it does not open the link in a new tab although I forced Firefox to open all links in new tabs. I need to press the CTRL key the same time to get it working, which is super annoying but a good muscle workout. |
Replies: 1 comment 1 reply
|
Hello @jqwv to make Firefox open all links inside PDFs in a new tab, change this hidden browser setting: Type about:config in the address bar and press Enter. Click "Accept the Risk and Continue". Search for the following preference:
Change its numerical value from 0 (or 1) to 2. Why doesn't Firefox's global setting work for PDFs? PDF documents opened in Firefox are rendered using its built-in JavaScript engine (pdf.js), which operates differently under the hood: JavaScript Interception: pdf.js renders the PDF pages onto an HTML and manages link clicks using its internal LinkService class rather than native browser navigation. Custom Event Dispatching: Clicks inside the PDF don't trigger the browser's native link-dispatching engine directly; they are caught by custom event handlers built into the viewer. Context Isolation: By default, pdf.js forces external link targets to _self or _top to prevent breaking frame behavior or launching unwanted popups when embedded (e.g., inside an <iframe>). Because of this design, the viewer overrides the browser's global tab preferences unless you explicitly change the internal pdfjs.externalLinkTarget configuration option. |
Hello @jqwv to make Firefox open all links inside PDFs in a new tab, change this hidden browser setting:
Type about:config in the address bar and press Enter.
Click "Accept the Risk and Continue".
Search for the following preference:
pdfjs.externalLinkTargetChange its numerical value from 0 (or 1) to 2.
Why doesn't Firefox's global setting work for PDFs?
Firefox's standard browser preference to "Open links in tabs instead of new windows" only applies to standard HTML web pages (native elements).
PDF documents opened in Firefox are rendered using its built-in JavaScript engine (pdf.js), which operates differently under the hood:
JavaScript Interception: pdf.js renders the PDF pages onto …