If I had a link to a file such as http://www.example.com/test.abc

How do I ensure that when the link is clicked the file is downloaded, instead of the file contents just getting rendered in the browser.

In tests, Chrome and Firefox seem to download the file, but IE renders the content.

link|improve this question

69% accept rate
feedback

1 Answer

up vote 1 down vote accepted

IE guesses mime-types. You need to set the mime-type for the .abc extension in your webserver to:

application/force-download

Which should force the browser to download it.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.