title: File download on Safari using response package: Failed to load resource: Frame load interrupted
body: <p>I want to download a file when the user clicks on a button. I implemented it through python flask with the response package as follows </p>
  
  <pre><code>bib_text = 'test'
  
  filename = 'test_file'
  response = make_response(bib_text)
  response.headers["Content-Disposition"] = "attachment; filename=%s.bib" % filename
  return response
  </code></pre>
  
  <p>the code above works fine on Chrome, but on Safari the javascript console tells me the error </p>
  
  <pre><code>Failed to load resource: Frame load interrupted
  </code></pre>
  
  <p>and instead of a .bib file it downloads a .bib.html file?
  Any idea what is going on? Is there another way to do this which works for Safari and Chrome?</p>