I'm sure the answer to my question is somewhere in this website, but I couldn't manage to find an answer that fixes my problem.
I'm trying to download a $.ajax()
or $.post()
response content as CSV. I know these jquery functions don't download automatically despite a Content-Disposition: attachment; filename="name.csv"
header, for security reasons.
But here are my constraints :
- The response can be extremely large, depending on the filters the user set.
- I don't want to clear the current page.
- I can't create a server-side CSV file.
- I'm not using
<a>
elements but<button>
Does anyone know how to do this in a clean and decently fast manner ?