In Sun site and a few other websites, I find two types of downloads, FTP Download & HTTP Download. What is the difference and how to implement it? Also how to make a download resume supported for broken net connections?

Luigi Viggiano

There are two different server types FTP (File Transfer Protocol) and HTTP (Hyper Text Transfer Protocol). FTP is able to service files located on the server using a protocol optimized for file transfer; HTTP is best to serve HTML and web pages, but can also be used to download files from the server.
An FTP server usually responds at port 21, instead HTTP server usually responds at port 80 (8080 for tomcat).

If the user is behind a firewall, maybe he has not been enabled to access FTP server, but easily he can access web using an HTTP proxy and download files using HTTP instead of FTP. This is why HTTP download should always be given as option for user downloads, to cover the case of users behind firewalls.

The difference is in the protocol used to sent files to clients, but common browsers can understand both and don't make procedural difference for the download.
Teorically FTP should be faster than HTTP. To implement it you just need to install 2 different daemons (or services) on the server: an FTP server and an HTTP server.
The URL to reference files on the server is a little different, here comes an example:

http://www.server.com/downloads/anyfile.zip
ftp://ftp.server.com/pub/downloads/anyfile.zip
Those urls can be cutted and paste in an html page and they will work.

There are already lot of FTP and HTTP servers that support the resume on broken connection, but mostly it's the user's browser that should also be able to resume (for example Opera) or little programs like GetRight etc.
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact