Javascript create file for download

So, if you’re trying to do this in a browser: Browsers don’t give Javascript access to the file system directly. Thus, when you say, “create a txt file,” it’s not directly possible to arbitrarily open a file, write to it, and close it using Javasc

While we’re doing amazing things with JavaScript on the server side, it’s important not to take our eyes off of some of the great stuff happening on the client side. One such awesome project I recently discovered was JSZip: a JavaScript library that allows you to easily generate ZIP files from the front-end. And why […] Jul 28, 2009 Creating a new