【问题标题】:Struts application - unable to download file through https on IEStruts 应用程序 - 无法在 IE 上通过 https 下载文件
【发布时间】:2011-07-01 07:18:02
【问题描述】:

我有一个 Struts 应用程序,它在某些时候提供了下载某些文件的可能性。 我最近发现在 IE 8 上通过 https 下载失败。使用 Firefox 4 可以正常工作。

我在 IE 中遇到的错误是:

Internet Explorer 无法下载 来自本地主机的 someAction.do。

Internet Explorer 无法打开 这个互联网站点。请求的 网站不可用或不能 被发现。请稍后再试。

有什么想法吗?

【问题讨论】:

    标签: internet-explorer-8 https download struts


    【解决方案1】:

    在 HTTPS 上使用文件下载的每个人都可能在 Internet Explorer 中遇到过这个问题。

    If a user tries to download a file over a HTTPS connection, any response headers that prevent caching will cause the file download process to fail in Internet Explorer.

    在 Microsoft 支持网站上也有很多此类问题的参考资料(例如 Internet Explorer file downloads over SSL do not work with the cache control headers

    【讨论】:

    • 谢谢。我设法在响应中取消设置所有与缓存相关的标头属性,现在它可以工作了。
    • 谢谢!你的链接拯救了我的一天!
    【解决方案2】:

    经过一番研究,我发现我们需要添加标题

    Cache-control: "no-cache"
    

    Pragma: "no-cache".

    使您的应用程序与 IE8 兼容。 不幸的是,这对我不起作用。

    【讨论】:

    • 这对我有用;将 IE 的缓存控制设置为私有,非 IE 浏览器设置为无缓存
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-27
    • 2018-12-25
    • 1970-01-01
    相关资源
    最近更新 更多