title: Javascript to Download String
body: <p>Trying to initiate a browser download in Javascript, but the data I want to be downloaded is in a string, not a file. I know if it were a file, the following would do it:</p>
  
  <pre><code>window.location.href = '/filepath/file.csv';
  </code></pre>
  
  <p>How can I get this same effect, only with a string (with csv data), not a file that already exists on the server?</p>