Hi,
I'm offering a free mp3 on my website for people to download. However, when you click on it, it automatically opens and plays. Is there any way of having a link that, when clicked, automatically downloads the mp3 file to the user's desktop (without people having to right-click or control-click on Mac/Safari or command-click on older macs)? For example, when using my newer Mac, I have to use Safari because it doesn't want to download the file in Firefox. It would be good if people could download the file with a simple click, rather than having to give instructions for different computers/browsers.
Many thanks for any help!

(p.s.: just noticed that this was probably the wrong forum to post this - if one of the moderators could move it to wherever it fits in best, that would be great - apologies!)

If the URL to the mp3 file ends with /songname.mp3 for example, it will download to most desktops by clicking on the link. There should be a pop up box when clicking the link, asking the user "to save" or "to open" the file. If they choose "open" it will open with their media player provided their media player can read the http protocol. If they choose "download" it wil download to their desktop.

It may be that your own settings are set to "open" media url's automatically.

Well yes, they are (on Firefox anyway). My concern is that many of the site's users have similar problems (this includes many older users). Is there any way of having "just" a download link or button that works across all platforms/browsers?
Thanks for your reply :)

There are many different ways in how you can set up your mp3 file for users to enjoy. For example: You can create a playlist file that users can download to their desktops and then clicking on it on their desktops, it will open the file on your server. In other words, they actually downloaded the play link in stead of the file. Buttons you can create as images linking to your file as well. The point is, that if the user's own personal media settings are set to "open" a file in stead of downloading it, their default mediaplayer will open the file and start playing it.

I presume out of your writing that you would like to create something that all browsers can access without a problem. For this I suggest you install a player button on your webpage, where a user can just click on the play button to enjoy your mp3.

A free mp3 player that I personally use, and its working very good, that you can use for this purpose, you will find here: http://www.podcast-player.com/en/free-mp3-player.cfm

This is a setting on the browser.

When you first download a file on most browsers after installing the browser, a dialog box opens to ask what you want to do with the file. There is a checkbox saying "open all files of this type in this way" in the dialog box. If you check the checkbox, you will never see that dialog box again for that kind of file.

Thanks for all the great suggestions :) .
In the end, I took the easy way out and uploaded the mp3 as a zip file - that way, it always gets downloaded. I didn't necessarily want users to listen to it on the website, anyway.
Thanks again!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.