How do I script downloads from my website?

They have: 2 posts

Joined: May 2000

I'm a newbee webmaster designing my webpage, so how do I setup my webpage to allow people who visit my website to download files. How does it work? I've looked at source code on webpages that download free files, but I can't figure how it works. I see where it points to the file to be downloaded, but how does the download window get started?

They have: 35 posts

Joined: Mar 2000

Hi,

If you simply upload a file that the browser cant read it will prompt the user to download the file. So all you need to do is link to the file (usually a .zip) that you want th visitors to download and the brwser will bring up the download window.

------------------
Fletch
http://www.web-headz.co.uk http://www.web-headz.com
[email protected]

They have: 231 posts

Joined: Feb 2000

The code for that is:

<a href="file.zip">file.zip</a>

Also you can automatically start the download when the page starts with JavaScript. This method is used by many sites.

Insert this b/w <head></head>:

location.href = "file.zip"

:: Lloyd Hassell :: http://www14.brinkster.com/lloydh ::

They have: 2 posts

Joined: May 2000

Thanks guys, I didn't realize it was so simple, but only you real webmasters know this stuff, right?

They have: 231 posts

Joined: Feb 2000

No - your the only one who didnt. Just kidding.

They have: 122 posts

Joined: Jun 1999

that was very cold, Llyod

They have: 231 posts

Joined: Feb 2000

Its Lloyd - not Llyod

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.