Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my employer web server, we have 200+ PHP applications with this kind of code to allow download of a file :

header('Content-Disposition: attachment; filename="file.pdf"');
header('Expires: 0');
header('Pragma: no-cache');

It run fine on the old server (Debian Lenny, PHP 5.2, Apache 2.2.9), but fail on IE8 with the new one (Debian Squeeze, PHP 5.2, Apache 2.2.16). Others browsers are fines. We only access file via HTTPS, never HTTP. We do not find any difference between the conf file, but replacing no-cache by private correct the problem with IE. Where can we look to understand where the difference is?

share|improve this question
If you want to look to see what the differences is you look at the HTTP specifications. I really don't understand what the pragma should have to do with anything in the context of this question though. You try using the hacky method of forcing a non-standard mime-type. Header("Content-type: application/force-download"); – Zoredache Dec 5 '12 at 18:35
The force-download does not change anything. It was is my toolbox, but not the right tool. I do not understand why there is a difference, still working on it. – Cédric Girard Dec 6 '12 at 14:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.