Karlston Posted February 17, 2020 Share Posted February 17, 2020 Open in Browser is a Firefox extension that opens PDFs, images directly instead of downloading them Firefox as you know, has built-in support for viewing some document formats like TXT, PDF, XML and image formats. But sometimes you get a download dialog open up, instead of the content being displayed. That's not convenient if you prefer that the content is opened in the browser, and is precisely what the Open In Browser extension for Firefox is meant to fix. How does it work? When you click on URLs that contain a file, websites return a MIME type (Multipurpose Internet Mail Extension) to your browser; these contain something called a "content-type" header. Sometimes, the data that is provideds may not work as intended, for e.g. you might have clicked on an image to view the full-size version, but instead Firefox shows you a download option instead of opening it right away in the browser. Example 1: The browser will directly download the PDF. Example 2: Clicking a document's (or image's) URL prompts the download dialog instead of allowing the browser to view it. Surprisingly both links didn't open the documents, despite the fact that the "Preview in Firefox" option for PDF had been enabled. I tested other PDFs from my inbox, Internet Archive, etc and they all opened directly. I installed the add-on and tried accessing the same URLs. A new prompt appeared and Open in Browser detected them as "server sent MIME". It had an option to open it with Firefox. This saves you the trouble of downloading and opening it. Another advantage is that your downloads folder doesn't get cluttered. The extension also allows you to select the way the download should be handled; it can be used to open web files in five ways: As a text, a web page, an XML, an image or a PDF. This is of course limited to the browser's capabilities. Obviously, you will need compatible content as well for this to work. e.g. text documents, PDFs or PNGs. Other file types will be downloaded as they're normally handled by the browser. There is a caveat, you will see the download dialog twice anytime you try to download something (EXEs, ZIPs, MSIs etc) when you have the extension installed. There is a fix for this as well: head to the about:addons page, click on Open In Browser > Options. Enable the setting that reads "Never ask to confirm "Save File" action". You will notice it has a link next to it that says "application/prs.oib-ask-once", click on it and you will see a download dialog pop-up. Enable the "Do this automatically for files like this from now on" option for it, and the extension won't bother you with double download dialogs. If the extension is not working with a particular file, try forcing it by going to the Tools menu (F10 or Alt) > Open in Browser > Enable for next request. Warning: Never set the "Open with Firefox" option and then enable "Do this automatically for files like this from now on" option. Doing that will open blank tabs endlessly, thus crashing your session. This is not related to the add-on, but an issue with Firefox. Open in Browser is an open source extension, the source code is available on GitHub. The add-on improves the browsing experience a bit, and saves some precious time. Landing Page: https://addons.mozilla.org/en-US/firefox/addon/open-in-browser/ Source: Open in Browser is a Firefox extension that opens PDFs, images directly instead of downloading them (gHacks) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.