i have a link to a media file such as an mp3, and i want it to get downloaded when the user clicks on it, instead of just having the file get played. the page i have in min
Client side JavaScript can't achieve that (the nearest functionality is document.execCommand('SaveAs'), wich just saves the entire html page).
document.execCommand('SaveAs')