Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Download button

Status
Not open for further replies.

nflutter

Technical User
Aug 7, 2005
34
GB
I need to allow my visitors to download files from by clicking a hyperlink or button - any easy ways

Thanks in advance.
 
Browser will prompt for downloading any link pointing to a document type (mime-type) that the browser does not know how to handle, or believes downloading the file is the best way to handle it (usually compressed files). Within HTML you cannot force visitor's browser to download something that their browser wants to display within the browser. The only way to do that is to serve the mime-type as something that will confuse the browser, making it think it is not the file it actually is. But that falls out of the scope of this forum. To simply link to a file that will be downloaded, use:
Code:
<a href="myFile.zip" title="Download MyFile.zip compressed file">My File</a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top