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
Is far is I know that's not possible. Without the ability to set the appropriate headers the browser will decide what to do with the file, which usually is playback, you will have to ask to users to press, right-click+save as. If you have access to the server it is quite simple to set the headers in php or apache using .htacces
<FilesMatch "\.(?i:mp3)$"> ForceType audio/mpeg Header set Content-Disposition attachment </FilesMatch>
Or so the browser won't recognize it's an MP3 and won't even try opening it:
<FilesMatch "\.(?i:mp3)$"> ForceType application/octet-stream Header set Content-Disposition attachment </FilesMatch>
For php header setting see: http://nl.php.net/header