1 person found this helpful
I am reluctant to use that method because zip files compress and compression can do funny things to files.
Fear not. The zip compression is not a 'lossy' method, it's a simple statistical compression method (when three or more bytes are found adjacent in the file, they are replaced by two bytes, one indicating the repeating value, and the other indicating how many repeats), so the files will decompress exactly like they were before. A good example of a lossy compression would be when you create a jpg image.
Alternatively, you could force a download with a little server-side scripting. Google "force download". You would need some proficiency in server scripting to use this method, however.
I know that zip files work. But I don't want to use a zip file. I can't believe that this can't be done internally in dreamweaver though! I have been to so many sites where you click and it just downloads the audio files. Surely there is a way?
1 person found this helpful
well, this used to require a server side script.
Although I haven't tried it yet, HTML 5 now appears to support a download attribute:
Try it and see if it works for you. I suggest trying in all popular browsers as I'm not sure how well it is currently supported.
The download attribute isn't supported very well yet, even in modern browsers.
Both Explorer and Safari ignore it completely.
When you say "widely" you then mention two of the browser which are the most annoying and getting closer to the least used. Safari is hardly used and internet explorer hardly supports anything, give me Firefox and Chrome anyday.
By the way as you notice I marked the question as "Correct". If you don't think bregent's answer was good then don't just say so (months after the issue was solved) without suggesting an alternative!
Woops, I didn't notice the date, there was some sort of activity on the post that brought it back to the top of the forum.
IE and Safari are still by far the most widely used browsers under Windows and Mac respectively. Neither are fading into obscurity anytime soon and neither will work with the HTML5 download attribute.
I did forget to mention the best way to force an audio file to download (that works in all current browsers, including IE and Safari) would be to first compress it into a .zip archive, then link to the .zip. For that, I apologize.
when I made that suggestion I was unaware of the lack of support. I actually made the same suggestion in a later thread a few months ago when Jon pointed out the limitation to me at that point. Knowing that now, I do not recommend using the download attribute until it is better supported. You may not like IE or Safari, but they are very popular and what many of your visitors will probably be using.
Thanks for the tips guys! I will reconsider using the attribute link. I was aware of the lack of support but I might use both methods in some cases (just cause I love the attribute link) .