I need to trigger a file download using Javascript when user clicks on a certain button. To do that I use:
window.open('my_url.com/my_file.pdf');
However, in Firefox this opens the PDF in a new tab. I'd like instead that the PDF file doesn't get opened but downloaded, with a dialog box asking for a folder in which downloading the file.
How to do that?