Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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. w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.32 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

 
discard

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

Browse other questions tagged or ask your own question.