原因:
(1) 在IE6/7下,使用HTTPS下载/打开文件时,通过抓包发现文件已传输,但IE提示“Internet Explorer无法下载 *** (来自 ***)。Internet Explorer无法打开该Internet站点。请求的站点不可用,或找不到。请以后再试。” ("Unable to download. Internet Explorer was unable to open this site. The requested site is either unavailable or cannot be found. Please try again later."),下载失败。
(2) 如果下载目标有一个hyperlink,当右键选择“目标另存为...”时,提示“Internet Explorer无法下载 *** (来自 ***)。无法将文件写入高速缓存”("The file could not be written to the cache"),下载失败。
原因:
参考Microsoft KB815313316431812935323308
参考:http://www.51testing.com/?uid-160865-action-viewspace-itemid-209104
解决方案:
//确保IE识别本次为下载文件
response.setHeader("Content-Transfer-Encoding","binary");
response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");
response.setHeader("Pragma", "public");
参考http://hi.baidu.com/%CD%F5%B7%EF%C4%FE/blog/item/28290d13d79ba82bdc540115.html
(1) 在IE6/7下,使用HTTPS下载/打开文件时,通过抓包发现文件已传输,但IE提示“Internet Explorer无法下载 *** (来自 ***)。Internet Explorer无法打开该Internet站点。请求的站点不可用,或找不到。请以后再试。” ("Unable to download. Internet Explorer was unable to open this site. The requested site is either unavailable or cannot be found. Please try again later."),下载失败。
(2) 如果下载目标有一个hyperlink,当右键选择“目标另存为...”时,提示“Internet Explorer无法下载 *** (来自 ***)。无法将文件写入高速缓存”("The file could not be written to the cache"),下载失败。
原因:
参考Microsoft KB815313316431812935323308
参考:http://www.51testing.com/?uid-160865-action-viewspace-itemid-209104
解决方案:
//确保IE识别本次为下载文件
response.setHeader("Content-Transfer-Encoding","binary");
response.setHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");
response.setHeader("Pragma", "public");
参考http://hi.baidu.com/%CD%F5%B7%EF%C4%FE/blog/item/28290d13d79ba82bdc540115.html