homepage Welcome to WebmasterWorld Guest from 54.211.157.103
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
MIME Type - forcing download
txbakers




msg:4201309
 6:51 pm on Sep 13, 2010 (gmt 0)

Right now, when a person clicks on a link to an mp3 file, the mime type is set to automatically play (or try to play) the file.

I'd like to force the browser to download the file rather than start playing it.

Is there a way to locally override the mime type directions in the HTML code?

THANKS.

 

lammert




msg:4201473
 2:21 am on Sep 14, 2010 (gmt 0)

You can try to send the Content-Disposition header with the file. I am not sure it is interpreted correctly by all browsers though. As an example to force a download dialog which tries to safe the mp3 file with the name example.mp3:

Content-Disposition: attachment;filename="example.mp3"

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved