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?
Created May 7, 2012
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.zipThose 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.