 <p>When returning the file to the browser, set the mime-type to be "application/x-unknown" - this will cause the browser to ask you to download as it won't know how to handle it.</p> <p>There is the possibility the browser will read the file extension and try and be clever, but there's nothing you can do about this.</p>