Struts application - unable to download file through https on IE
I have a Struts application that at some point offers the possibility to download some files. 开发者_如何学GoI recently found out that download fails through https on IE 8. With Firefox 4 is working fine.
The error I get in IE is:
Internet Explorer cannot download someAction.do from localhost.
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
Any idea ?
Everyone who used file downloads on HTTPS is likely to have hit this problem with 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.
There are lots of references to this kind of issue on the Microsoft Support site also (e.g. Internet Explorer file downloads over SSL do not work with the cache control headers)
After some research I found that we need to add headers
Cache-control: "no-cache"
and
Pragma: "no-cache"
.
to make ur app compatible with IE8. Unfortunately this is not working for me.
精彩评论