title: Javascript: set filename to be downloaded
body: <p>I'm using a plugin to generate a csv file from a table, the file is being downloaded with a "download" filename, how can I change the filename e.g. as dowload.csv</p>
  
  <pre><code>var csv = $("#table").table2CSV({delivery:'download'});
  window.location.href = 'data:text/csv;charset=UTF-8,'+ encodeURIComponent(csv);
  </code></pre>