开发者

Get attached file content with XmlHttpRequest and Internet Explorer

开发者 https://www.devze.com 2022-12-29 03:02 出处:网络
I\'m using XmlHttpRequest to perform a text file download, and here is the response header I have got from the server :

I'm using XmlHttpRequest to perform a text file download, and here is the response header I have got from the server :

Connection: keep-alive
Transfer-Encoding: chunked
Content-Disposition: attachment; filename="template"
Content-Length: 244
Pragma: no-cache
Cache-Control: no-cache, must-revalidate
Expires: 0
Content-Encoding: deflate
Content-Type: application/force-download; name="template" 

With Firefox or another browser, all is fine: response.responseText contains the text file and I can put it in a te开发者_StackOverflowxt area, but with IE8, responseText is empty. How to get the response with IE?

0

精彩评论

暂无评论...
验证码 换一张
取 消