I am having trouble setting the headers() to always download in Mac IE. No other browsers are giving me problems. It's happening on all version of Mac IE on OS 9 and OS X
header("Content-type: application/octet-stream");
header("Content-Length: ".$filesize);
header("Content-Disposition: attachment; filename=".$filename);
header("Content-Transfer-Encoding: binary");
Mac IE will download the file just fine unless it is a .jpg or .gif
If it is a .jpg or .gif IE opens it in the browser. I have tired any number of comibnations of headers(), but nothing seems to be working.
taking about attachment gives the same problem.
header("Content-Disposition; filename=".$filename);
Anyone know how to get Mac IE to always download the file - no matter what the file type?
Searching for this problem turns up LOTS of people having this same exact problem. . . .
Setting headers to download in Mac IE
Moderator: General Moderators
This is for shure not an answer but IE and opera using application/octetstream instead of application/octet-stream
BTW check this
BTW check this
Code: Select all
header('Content-Disposition: inline; filename="' . $filename . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');