Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

What MIME type do I use to get Firefox to view PDFs without a save dialog?

  • 1 svar
  • 1 har dette problemet
  • 14 views
  • Siste svar av Vertigo

more options

When I download a PDF off of most sites, it opens directly in my external program (okular). However, on my own server this is not the case: I get a save dialog first. I believe the problem is actually caused by the MIME type I am sending, but I cannot seem to figure out what that should be. I am using PHP 5.2.17 on apache 2.2.17 with mod_xsendfile to download the files. The headers I am sending are:

header('X-Sendfile: test.pdf'); header ('Content-Type: application/pdf'); header('Content-Disposition: inline; filename="testing.pdf"');

When I download a PDF off of most sites, it opens directly in my external program (okular). However, on my own server this is not the case: I get a save dialog first. I believe the problem is actually caused by the MIME type I am sending, but I cannot seem to figure out what that should be. I am using PHP 5.2.17 on apache 2.2.17 with mod_xsendfile to download the files. The headers I am sending are: header('X-Sendfile: test.pdf'); header ('Content-Type: application/pdf'); header('Content-Disposition: inline; filename="testing.pdf"');

All Replies (1)

more options

Well, never mind: it looks like I deleted my mimetypes.rdf and restarted Firefox and now it works.