最近项目中碰到了这个问题,将网上的东西贴过来备注下
[size=medium] 在IE6/7/8下,使用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."),下载失败。[/size]
[size=medium] 如果下载目标有一个hyperlink,当右键选择“目标另存为...”时,提示“Internet Explorer无法下载 *** (来自 ***)。无法将文件写入高速缓存”("The file could not be written to the cache"),下载失败。[/size]
解决方法
[size=medium](1) 参考上述MS KB,向client注册表增加下列DWORD条目BypassSSLNoCacheCheck,值设为1;
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\BypassSSLNoCacheCheck
下载reg
(2) 如果不方便修改client端,检查服务器端相关程序(eg. httpd),看是否在HTTP response header中自动添加了“Pragma: no-cache”等内容。(参考 MS KB316431的“更多信息”(More Information)部分)[/size]
[size=medium](3)在后台程序返回时加上响应头
httpServletResponse.setHeader("Expires", "0");
httpServletResponse.setHeader("Pragma", "public");
httpServletResponse.setHeader("Cache-Control",
"must-revalidate, post-check=0, pre-check=0");
httpServletResponse.setHeader("Cache-Control", "public"); [/size]
参见:http://blog.csdn.net/buyaore_wo/article/details/7380004
[size=medium] 在IE6/7/8下,使用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."),下载失败。[/size]
[size=medium] 如果下载目标有一个hyperlink,当右键选择“目标另存为...”时,提示“Internet Explorer无法下载 *** (来自 ***)。无法将文件写入高速缓存”("The file could not be written to the cache"),下载失败。[/size]
解决方法
[size=medium](1) 参考上述MS KB,向client注册表增加下列DWORD条目BypassSSLNoCacheCheck,值设为1;
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\BypassSSLNoCacheCheck
下载reg
(2) 如果不方便修改client端,检查服务器端相关程序(eg. httpd),看是否在HTTP response header中自动添加了“Pragma: no-cache”等内容。(参考 MS KB316431的“更多信息”(More Information)部分)[/size]
[size=medium](3)在后台程序返回时加上响应头
httpServletResponse.setHeader("Expires", "0");
httpServletResponse.setHeader("Pragma", "public");
httpServletResponse.setHeader("Cache-Control",
"must-revalidate, post-check=0, pre-check=0");
httpServletResponse.setHeader("Cache-Control", "public"); [/size]
参见:http://blog.csdn.net/buyaore_wo/article/details/7380004