Please forgive me if it seems a silly question, I have this doubt and couldn't find the answer on the web.
How browser and any other downloader downloads a file, which protocol is working at the backend HTTP
or FTP
.
As we all know HTTP
can be used to transfer text, which can be rendered by the browser. It can also send binary data.
Let's say I want to access a webpage at www.xyz.com/index.aspx
which has a static webpage with 2 images. As we all know a total of 3 HTTP requests will be made, one for webpage and other 2 for images.
But what about other files which have a big size. I mean suppose I'm downloading an mp3/mp4 files (having link given on the webpage). So, what protocol is working at the backend HTTP or FTP.
Fetching files from the server Traditionally, the file to be downloaded is first requested from a server through a client — such as a user's web browser. The server then returns a response containing the content of the file and some instructional headers specifying how the client should download the file.
Hypertext Transfer Protocol (HTTP) downloads use the same protocol as browsing websites to send the file data. It is the most popular way to download files from the internet. All web browsers use this to download files directly.
Ultimately, FTP is more efficient at transferring large files, whereas HTTP is better for transferring smaller files such as web pages. Although both utilize TCP as the protocol of choice, HTTP uses a persistent connection, thus making the performance of the TCP better with HTTP than with FTP.
FTP clients are used to upload, download and manage files on a server.
It depends on the url :
ftp://www.example.com/bla/bla/bla01.zip
will be fetched via ftp, and
http://www.example.com/bla/bla/bla01.zip
will be fetched via http
Of course we cannot simply change http:// with ftp:// as http need an http server, and ftp need an ftp server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With