What content type to force download of text response?

To be on the safe side and ensure consistent behavior in all browsers, it’s usually better to use both:

Content-Type: application/octet-stream
Content-Disposition: attachment;filename=\"My Text File.txt\"

Leave a Comment