Download attachment issue with IE6-8 wih no SSL
I'm facing an issue with file download with IE6-8 in non ssl environment. I've seen a lot of articles about the IE attachment download issue with ssl.
As per the articles I tried to set the values of Pragma, Cache-Control headers, but still no luck with it.
These are my response headers
Cache-Control: private, max-age=5
Date: Tue, 25 May 2010 11:06:02 GMT
Pragma: private
Content-L开发者_开发百科ength: 40492
Content-Type: application/pdf
Content-Disposition: Attachment;Filename="file name.pdf"
Server: Apache-Coyote/1.1
I've set the header values after going through some of these sites
KB 812935 KB 316431 But these items are related to SSL.I've checked the response body and headers using fiddler, the response body is proper.
I'm using window.open(url, "_blank") to download the file, if I change it to window.open(url, "_parent") or change the "Content-Disposition" to 'inline;Filename="file name.pdf"' it works fine.
Please help me to solve this problem
The issue was not with the file download headers. I was downloading the file in the callback of a async AJAX method.
It looks like this is not allowed in IE, I just made the AJAX call to be a synchronized call and it started to work.
Is there any other solution for this issue than making the AJAX call to be synchronized?
精彩评论