Redirect mp3 Files to Download Instead of Stream

Here’s a quick hit that may prove useful. We had a need to have mp3 files default to offering the ability to save the file rather than stream it using the browser default player. I realize you can right click/save as, but this not the most user friendly solution. When the goal is to make it as easy on the user as possible, you have to minimize clicks, or at least provide simple instructions. In my opinion, nothing is simpler than a popup offering to save the file. So without further ado, the code:

AddType application/octet-stream mp3

Just place this in your .htaccess file and the server will handle the rest!

1 thought on “Redirect mp3 Files to Download Instead of Stream

Leave a Reply

Your email address will not be published. Required fields are marked *

Name *