Force download vs display in bowser.
Posted: Sat Apr 10, 2004 5:41 pm
I have a text file that is used to import data into a 3rd party application. There is a link to this text file on my site.
The problem I'm having is when the user clicks the link the text file is opened in the browser. I would like for the user to be prompted to download the file not view it in their browser.
Some options I have considered are the following but all have their issues.
Changing the file type will up my help desk calls when users are unable to open the file on their desktop. For instance, if I named the file *.txt2 the users computer will not know what application to view the file with.
Any ideas or suggestions?
Code: Select all
<a href="update.txt">Here</a>Some options I have considered are the following but all have their issues.
- Save txt file in a zip file and have the user download the zip file.
Change the file type to something the browser won't try to read.
Changing the file type will up my help desk calls when users are unable to open the file on their desktop. For instance, if I named the file *.txt2 the users computer will not know what application to view the file with.
Any ideas or suggestions?