Ok, so I have this webpage page that gets its data using AJAX requests (in javascript using jQuery). After the data has been downloaded to the users browser, I want them to download the specified data without a second request from the server.
To do this, I found this little code (in Javascript):
window.location = 'data:text/csv;charset=utf8,' + encodeURIComponent(someCSVtext);
This does what I want, but it always names the file "download.csv"
Is it possible to specify a file name if the user has the option βalways download fileβ installed in their browser (thus, you cannot rename the file)?
source share