Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE8 :Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found

This should be a old problem about IE8 download problem. I used PHP to set the response header like:

header("Pragma: public");
header("Expires: 0"); 
header("Content-type: application/octet-stream");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Length: ".strlen($content));
header("Content-Disposition: attachment; filename='$filename'");

and the Connection is close capture by Fiddler.

When I try to download the file with above header in IE8 (not in SSL), the message box :

"Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found." pop up and download is stopped.

I searched on net and try lots of solutions but seems none of them works. Would there be any other solution for this problem?

PS: I have tried: Delete response header/reset contentType in header/ Add the site into trusted site/ set "Do not save encrypted pages to disk" as true.

Thanks.

like image 269
nelsonwrong Avatar asked Apr 16 '13 03:04

nelsonwrong


1 Answers

In addition to Le-roy's answer:

I set

Cache-Control: private, max-age=1

and that fixed the issue for me.

From Le-roy's link, if any of these are set:

Cache-Control header with the tokens no-cache, no-store
Vary header that specifies almost anything 
Pragma header that specifies exactly no-cache

IE download will fail.

like image 127
Somaiah Kumbera Avatar answered Oct 24 '22 00:10

Somaiah Kumbera