IE阻止使用SSL连接下载文件 - CacheControl问题 [英] IE blocking file download with SSL connections - CacheControl issue
问题描述
很抱歉,如果这似乎重复,但我已经遍布interwebz寻找一个满意的答案。
Sorry if this appears repetitive but I've been all over the interwebz looking for a satisfactory answer to this.
IE 8(6井和7井)不允许通过基于https的连接下载文件。
IE 8 (well 6 and 7 as well) is not allowing downloading files over a https based connection.
我知道这是MS支持网站中建议的缓存控制问题
I understand this is a cache-control issue as suggested in the MS support website
我尝试了从设置缓存控制到在响应头中禁用pragma的所有内容,如下面的链接所示
and i've tried everything from setting cache-control to disabling pragma in the response header as suggested in the below links
- Internet Explorer Cannot Download https://something
- Internet Explorer Can't Open Files Via HTTPS: Try Removing The Pragma Header
我还是无法解决问题。
我更喜欢浏览器修补程序或注册表更改以外的其他内容。
I would prefer something other than a browser fix or a registry change.
我在java中的代码看起来如下
My code in java looks as follows
response.addHeader("Content-Disposition", "attachment; filename=myXLS.xls");
response.addHeader("Cache-control", "public");
response.addHeader("Pragma", "public");
感谢帮助。谢谢
推荐答案
看看响应标头 - 很可能你的网络服务器正在为这种类型的文件设置一些与缓存相关的标题。我要做的第一件事是请求用'wget'说这个URL,让它打印响应标题和看看那里有什么。
Take a look at response headers - most likely your web server is setting some headers related to caching for this type of file. First thing I would do is to request this URL say with 'wget', let it print response headers and see what's there.
这篇关于IE阻止使用SSL连接下载文件 - CacheControl问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!