Force Download of .csv file via JS or any other means
Posted on 2000-05-15
I have searched this site and I have found many similar answers to my question: How can you force a file to be downloaded instead of opening in the browser? This is exactly what I want to happen. I have a button on a webpage that points to a csv file. When the user clicks on it, I want the browser to automatically prompt for save/download instead of displaying the file.
Current Problems (limitations):
1) The filename is created beyond my control. It will always be *.csv.
2) I am trying to bypass the right-click save or file save as options.