IE8 Issue Downloading or Opening Files

I recently had an issue sending the right headers to let IE8 know to go ahead and download a file, in this case a PDF. If you’re running into the same issue, make sure you send the following headers, at a minimum:

Pragma: public
Expires: 0
Cache-Control: private

And then finally, your content type header:

Content-Type: application/pdf

This should cause IE8 to download the file. If you want the PDF to open up within the browser, make sure to include the following header:

Content-Disposition: inline

Adding these headers shouldn’t cause issues in any of the other browsers.