HTTP Headers to force browsers to open a file instead of downloading it:
How do I force files to open in the browser instead of downloading (PDF)?
If you want to set your own Firefox to open PDFs:
By default, Firefox should display PDFs inline unless your website has explicitly told it to download the file rather than open it.
If you go to the Firefox URL bar and type in about:config
and press enter, then once you pass the warning notice at the top you will need to type in browser.download.open_pdf_attachments_inline
and change this setting from default false
to true
.
You should also confirm that browser.shell.setDefaultPDFHandler.onlyReplaceBrowsers
setting is also set to true
.
Exit and then retry. PDFs should now open inside the browser itself rather than any 3rd party reader.
Read more here from Mozilla.
If you want to set so any browser that visits your website views PDF inline:
Recommended way to embed PDF in HTML?