title: Download dynamic generated zip by Javascript
body: <p>I want to make ZIP file by ajax and download.</p>
  
  <p>in PHP(makezip.php) ZIP file is dynamically generated.</p>
  
  <p><code>http://exmaple.com/myzip.zip</code></p>
  
  <p>How can I download by javascript???</p>
  
  <p><code>in javascript</code></p>
  
  <pre><code>function download(){
      $.ajax({
        url:  http://example.com/makezip.php // to Ajax
        type: 'POST',
        dataType: 'json',
        data: {'id' : id}
      }).then(
          function(data) {
  //How should I do here for download???
  //         var blob = new Blob([ "http://exmaple.com/myzip.zip" ], { "type" : "zip" });
  //         let link = document.createElement('a');
  //         link.href = window.URL.createObjectURL(blob);
  //         link.download = 'myzipname.zip';
   //         link.click();
        }
      );
  };
  </code></pre>