Get the attached file using XmlHttpRequest and Internet Explorer

I am using XmlHttpRequest to download a text file and here is the response header I received 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" 

      

It's ok with Firefox or another browser: response.responseText contains a text file and I can put it in the text area, but with IE8 the responseText is empty. How do I get a response with IE?

+2


a source to share





All Articles