title: How to create a dynamic file + link for download in Javascript?
body: <p>Typically, HTML pages can have link to documents (PDF, etc...) which can be downloaded from the server.</p>
  
  <p>Assuming a Javascript enabled webpage, is it possible to dynamically create a text document (for example) from within the user browser and add a link to download this document without a round trip to the server (or a minimal one)? </p>
  
  <p>In other word, the user would click on a button, the javascript would generate randoms numbers (for example), and put them in a structure. Then, the javascript (JQuery for example) would add a link to the page to download the result as a text file from the structure.</p>
  
  <p>This objective is to keep all (or at least most) of the workload on the user side.</p>
  
  <p>Is this feasible, if yes how?</p>