PDA

View Full Version : Browser downloading a linked file (url)


VileFriend
04-19-2003, 10:54 AM
How do I make a Browser download a url:confused: What I mean is how do people make a link download? Like PC World (http://www.pcworld.com/downloads/file_download/0,fid,5634,fileidx,1,00.asp) where they Download (http://ftp.pcworld.com/pub/new/utilities/other/vbrun60sp3.exe) ! HOW do they do that?

Can someone please inform me of what the html coding would be, or the scripting code? Anything would be appreciated, THANKS.:D

Joe the Large
04-19-2003, 11:44 AM
Include this in your html document:

<a href="filename.xxx">click here to download</a>

This assumes that the file to download is in the same directory as you index.html.

HTH

Joe

DCElliott
04-19-2003, 11:56 AM
There are a number of factors influencing the click behaviour of a URL. Most of all, it depends on the settings on the user's computer regarding different MIME-types (Multi-purpose Internet Mail Extensions)MIME-type examples:
text/richtext
text/html
audio/x-aiff
audio/basic
audio/wav
image/gif
image/jpeg
image/pjpeg
image/tiff
image/x-png
image/x-xbitmap
image/bmp
image/x-jg
image/x-emf
image/x-wmf
video/avi
video/mpeg
application/postscript
application/base64
application/macbinhex40
application/pdf
application/x-compressed
application/x-zip-compressed
application/x-gzip-compressed
application/java
application/x-msdownload

The user's computer may have different actions depending on the software on their computer. A video/* file will usually fire up a viewer, an application/pdf will fire up Acrobat while a application/x-zip-compressed will download because zips are designed to be downloaded, and so on. That is the default behaviour. Optional behaviour can be accessed by Right-clicking on the URL (ctrl-click on Mac, I think) where you can choose 'Save Target As' If you are writing a webpage with a URL to a downloadable file, you may want to remind folks to do a right-click if the file is not a type that automatically downloads, or if their system has some other default action.

Hope this helps.

DE

polliwogfrog
04-22-2003, 11:02 PM
Thanks for that nice list DC, a copy and paste (along with your letter) to be sure...
and....Hi! Know been gone, busy season, almost over, but reading all that say "DC Elliot" as last replier before shoving off again. Have a question of my own before leaving and will post new topic...lol...(such a selfish lil' frog!...visit for my own purpose....hope no-one offended...have more time in summer.

Nichole the frogger
:joy:

VileFriend
04-23-2003, 10:04 PM
Hey there polliwogfrog or is that http://homepages.paradise.net.nz/richka/gifs/Large bouncing green frog.gif ? Thank you for posting your appreciation. It has reminded me to do the same...http://homepages.paradise.net.nz/richka/gifs/thankyou blue sparkly.gif both Joe the Large for Include this in your html document: which of course assumes that the file to download is in the same directory {folder being the latest GeekSpeak) as your] index.html. Plus, of course DC for ... it depends on the settings on the user's computer regarding different MIME-types (Multi-purpose Internet Mail Extensions) Then came the GeekSpeak that you called a list eh polliwogfroghttp://homepages.paradise.net.nz/richka/gifs/QuestionGreen.gif

polliwogfrog
04-24-2003, 10:11 PM
Hey, thanks to you too Joe the Large , sorry got involved with "conversation" with DC, I've been gone for a while and was
just...well....also saying "Hi" to him as well as the thanks, and
went and did something stupid like to forget to say thanks to you too. :(

:joy:
Polliwog