title: How to generate and prompt to save a file from content in the client browser?
body: <p>I have a situation where I need to give my users the option to save some data stored locally in their client memory to disk. The current workaround I have is having a handler like this</p>
  
  <pre><code>(define-handler (download-deck) ((deck :json))
    (setf (header-out :content-type) "application/json"
      (header-out :content-disposition) "attachment")
    deck)
  </code></pre>
  
  <p>which does exactly what it looks like. The client sends their data up, and saves the returned file locally. </p>
  
  <p>This seems stupid.</p>
  
  <p>Please, <em>please</em> tell me there's a better, simpler, cross-browser way to let a client save some local data to their disk with a file-save dialog box. </p>
  
  <p>Every answer I read on the subject either says "no, you can't save files with javascript" or "yes, there's this one semi-documented piece of the Chrome API that might let you do it in three pages".</p>