Have you ever encountered situations in Firefox where supported file types like text files were not displayed directly in the browser but only offered to be saved to the local system? While that makes sense for file types the browser does not support, like executable files, there is no real reason to display a save dialog for text files or images by default.
The web browser decides whether to display files right away or display a save option instead usually. This can be partially customized by the user, for instance to automatically save files of a certain type to the system whenever they are requested.
Web servers can however use the Content-Disposition header to override this behavior of the browser. This is sometimes used to force the browser to ignore that it is capable of displaying the file contents right away so that a save or open dialog is shown instead.
As you can imagine, this can be irritating if you select the "do this automatically for files like this from now on" option only to get the same open or save dialog again the next time.
The user of the browser has no say in the matter and there is no option to ignore the header on the user's side, at least not when it comes to the default options the browser makes available.
Firefox users can install the InlineDisposition add-on for the browser to ignore the header so that supported file types can be viewed directly in the browser.
The extension works automatically once you have installed it in Firefox. A good way to find out if it is working is to open the following link in Firefox or another web browser. When you do that, you will notice that a text file is offered for download or downloaded directly to the computer.
With InlineDisposition installed, the text file is displayed in Firefox so that you can read it right away. You can still save it then by right-clicking the page and selected to save it to the device.
The extension works well for all file types that the browser supports internally. This includes text files, pdf documents, image formats and other media types.
Please note that servers can still prevent the inline viewing of file types if they specify a content-type that the browser does not support.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.