Sep
18
2007

Solving IE file download issue

Just a quick one. I’ve just been struggling with getting IE (both versions 6 and 7) to download a simple pdf. It was working fine in Opera and Firefox but IE would just block the download.

The issue was caused by php headers not being defined properly.

So remember that if you have your file type being defined as

header("Content-type: application/force-download");

it will not work in IE. Instead use the header

header("Content-type: application/octet-stream");

Hopefully this helps somebody.


Leave a Reply

*

 
 
 
 

Page optimized by WP Minify WordPress Plugin