How to generate a zip file (in memory) in the browser using javascript. You need to create an instance of JSZip and hold your file contents as blobs. You can run the 'zip.file' command as many times as you need. Just remember not to name files with conflicting names.