I've got a (should be) basic HTML question?
I've got a video i want to put a download link to on my website.
it currently reads something like this: <a href="folder/video.mpg">Video</a>
But it simply opens up in a new window unless i click "save as.."
is there anyway to bypass that so once clicked it goes straight to download?
Public Comments
- Since the file is in local hard drive, it will start opening it immediately unless you select Save link as. If it is over the network, it will start the download
- That has to do with the server and the user's browser settings. The server recognizes the mpg extension and sends a Content-type header with a value like multimedia/mpeg (I don't know exactly what it is) instead of a application/binary content type. You may be able to put a special file in the folder with the media file to tell the server what content type the files are. It depends on what server software its running and if the hosting company will let you put one in there. In the browser, you can tell it what to do for the various content types.
- There's no way to do this in HTML. The appropriate method to force a file to download instead of display is to use the Content-Disposition field in the header, along with an appropriate MIME type. Another (hackier, worse) method would be to change the MIME type to something unknown, like "video/somethingijustmadeup". That would also work. If you're not super-technical, you might need to talk to the folks at your web provider about how to change these things. Most web designers never touch this stuff. Here's the relevant article from Microsoft: http://support.microsoft.com/kb/260519
Powered by Yahoo! Answers