Downloading a file from website - what port will be used?

13,147

Solution 1

Sites will vary, but it will most often be 80 (http) or 443 (https) for the download.

It is very unlikely that will happen over the existing connection. Traditionally, each element of a page - the html, images, javascript, stylesheets - are all downloaded over their own connection (and so with a source port change). This is inefficient, and now http connection can be kept alive to download multiple elements over a single connection (re-using the existing source port).

However, the keep-alive for a session is intentionally kept short, as little as 5 seconds depending on the server, as its goal is to download a single complete web page as quickly as possible.

The clicking of a link to initiate a download is a separate event however, effectively requesting something new, and so wouldn't be lumped into the persistent session for the original download as the client should surrender the session as soon as it gets all the bits it needs to render the page.

So the request for the download would come from a different source port.

Solution 2

The downloading port may vary based on the protocol address

In general the standard port for HTTPS was 443

If you're on a corporate network, port 80 and 443 are usually bounced through a proxy server,other than that for FTP transfers it would be done through port no 21.

Share:
13,147

Related videos on Youtube

Noob
Author by

Noob

Updated on September 18, 2022

Comments

  • Noob
    Noob over 1 year

    If I go to a website and click on a link to download a file, what will be the protocol that is being use? Is it still HTTP? Will the source port and destination port remain the same?

    E.g. client (src port 12345) access webpage (dst 80) client click on a download link webserver (src port 80) send file for download to client (dst 12345)?

    • BlueBerry - Vignesh4303
      BlueBerry - Vignesh4303 almost 9 years
      in genral port 443 (the standard port for HTTPS) If you're on a corporate network, port 80 and 443 are usually bounced through a proxy server.