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.


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


Which should force the browser to download it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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