SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2002
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    click link, download mp3 instead of right click?

    hey, i was wondering if there was a way to click a link to an mp3, and instead of opening the mp3 in the browser (the way that IE 5.5 and up do) that it would ask to instead download the mp3.

    any clues?

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Yeah. Create a new HTML file, and call it something like mp3download.html. Then in the page you want the link to appear in, use this code:
    HTML Code:
    <a href="mp3download.html" title="Download">Download the mp3</a>
    Then, in mp3download.html, use this meta tag:
    HTML Code:
    <meta http-equiv="Content-Disposition" content="attachment;filename=mySong.mp3" />
    You can add other content in your mp3download.html file, but that meta tag will force download.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •