Home » Questions » Computers [ Ask a new question ]

How different is downloading a file from accessing a webpage?

How different is downloading a file from accessing a webpage?

I ask because here I have download speeds which are like 1MBps while the web pages take a very long time to load (definitely not 1 MBps).

Asked by: Guest | Views: 213
Total answers/comments: 3
bert [Entry]

"Some web pages have a lot of individual components, all of which have to be downloaded separately. Your browser handles all of this for you, but often with diminished performance, since a lot of different connections have to be made, and likely some will have to wait for others to finish. Moreover, web pages often have data from various different servers (the advertisements probably come from their own server), and a delay for any element can slow down the whole. A file is a simple download of one file from one place.

Therefore, bandwidth (the amount of data you can download in unit time) is very important in file downloads. Latency (the extra time) matters a lot more on the web."
bert [Entry]

"It's important to understand how a web page is downloaded in order to understand why downloading a 1MB file may be faster than even 256kb that comprises a website.

If GZIP compression is present in the web server for HTML/JavaScript/etc. (most likely), your browser will download compressed content and then have to decompress it.
Images may be only 30-40k, but decoded they can amount to many megabytes in memory
If the website has multiple external files (CSS/JavaScript/Images) each of those files can be downloaded on a separate connection as part of your browser composing the page
Downloading a file is a basic operation in HTTP/FTP which is streamlined. There's no content to discern and render"
bert [Entry]

"You didn't specify which browser you were using and what kind of internet connection you had.

If the internet connection is eg. satellite link, it has high download bandwidth and very slow upload bandwidth and high latency. Similar thing applies to 3G/HSDPA mobile connection, though latency is lower than in satellite but still often 10-30x compared to ADSL or cablemodem.

This can be made even worse by using a bad browser like Internet Explorer that only opens 2-3 concurrent connections when downloading the files from the webserver. With mobilephone type connections, a HTTP connection that does the 3-way TCP/IP handshake, a single file can take almost a second before it begins to download, now combine this with just few simultaneous connections from the browser and it suddenly takes tens of seconds to download small webpage that has several images and stylesheets and javascripts linked to it.

I use Opera which allows me to set the concurrent connections to some very hign number, eg 32 or more. This means that when opening a website over high latency link, the browser takes couple seconds to do the handshakes with the server and then it downloads 32 items simultaneously and often can max out the download bandwidth which would never happen if the browser did download single/few files at a time.

The speed difference can also happen if you computer is slow or doesn't have enough memory and the browser can then bog down the machine whilst it renders the page. This can be avoided by using a faster/lighter browser like Opera or if possible, set the browser not to render page until it has downloaded all required elements. Nowadays browsers try to render the page as soon as possible, which usually causes them to re-render the page multiple times and this can be slow on an older machine."