Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File download via JavaScript?

Tags:

javascript

So I had a thought today. I generate CSV from data already in memory in my JavaScript application, then pump that data to the user's browser via a File download prompt -- all in JavaScript --.

Is this possible?

like image 433
Drew Avatar asked May 25 '26 02:05

Drew


1 Answers

If you want to do it entirely on the client-side, without any server interaction, you will need at least the help of Flash.

Give a look to Downloadify, is the best I've seen for client-side file generation.

Check the demo.

like image 96
Christian C. Salvadó Avatar answered May 27 '26 17:05

Christian C. Salvadó



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!