Data explorer uses popup for download

The data explorer plugin creates a new popup window on the fly when you’re downloading the results as CSV or JSON.

This interferes with many browsers (or, to put it better: many browsers interfere with that) and I regularly have to retry because it yields a 404 (because of CSRF protection issues). For instance Error exporting CSV or JSON from Data Explorer plugin

i wonder if this code from 9 years ago is still the best way to do it? Actually, I don’t see the need for it at all, since the content-disposition header alone should work well (but I’m probably missing something there).