4

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).

I guess accessing a webpage is basically requesting it from a server, and then in a way "downloading" the page and then rendering it.

Am I wrong? What can be the reason that I have such a difference in download and webpage speeds?

1
  • Interesting to see so many views and upvotes on the answers and so few upvotes on the question itself ;-) +1 for sparking an interesting discussion!
    – Ivo Flipse
    Oct 7, 2009 at 10:52

6 Answers 6

2

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.

3
  • 1
    then wont it be better, if we could "download" the webpage (all its components - including images, etc) in one go (just like a normal single file download) and then render it. it will save the no of times the request has to be made for the different components and hence would be faster. Wouldn't it?
    – Lazer
    Oct 6, 2009 at 21:44
  • 1
    It would but that's not how the internet works. If it was, you'd have to inline all your images, etc. Each image is a seperate request to a server. Inlining all your images means that if you wanted to change one image used in a lot of different pages, you'd have to change all the different pages.
    – Drew
    Oct 6, 2009 at 22:07
  • @Drew yeah, correct, I understand this now.
    – Lazer
    Oct 8, 2009 at 10:04
5

This might be caused by any/all of the following:

  • The server is slow.
  • The server has a slow connection.
  • Your computer is slow. The rendering takes time as well.
  • While the connection allows 1Mbps of traffic, it has a high latency. Compare this to a ship. You can load a lot of stuff in a ship, but it will take a long time to reach it's destination.
9
  • Your comparison is confusing. 1Mb/s means the amount of data per a set amount of time. In essence, it's a ship that can hold 1Mb of cargo, and travel to it's destination in 1 second. Why would it be slower?
    – Giffyguy
    Oct 6, 2009 at 21:00
  • 2
    Say that I put 1Mb of data on the internet in one second. After I've done that, the data has not yet reached the destination. It first has to pass through a lot of cables, routers and other stuff. Just like a ship needs to plow through a whole lot of ocean. Compare the cable to a shipping route. I could put a ship on it every second, with a load of 1Mb. That doesn't mean that when I send the second ship away, the first has already reached it's destination. It's this latency that you get when you do execute ping command. Oct 6, 2009 at 21:16
  • [@Bart van Heukelom] I think I understand your comparison (it explains latency), but it still doesn't explain the difference in speeds that I am getting. Does it?
    – Lazer
    Oct 6, 2009 at 21:40
  • It does. A very small webpage may still take a long time to load if the latency is high. Sending a nearly empty ship will take just as long as a fully loaded one (if we ignore that the loaded ship needs more engine power :p) Oct 6, 2009 at 21:51
  • So is there a difference in actual speeds you are receiving, or are you just basing this off the speed your ISP gives you?
    – Josh Hunt
    Oct 6, 2009 at 22:03
3

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.

  1. 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.
  2. Images may be only 30-40k, but decoded they can amount to many megabytes in memory
  3. 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
  4. Downloading a file is a basic operation in HTTP/FTP which is streamlined. There's no content to discern and render
1
  • I never knew that decompression and decoding is to be done...
    – Lazer
    Oct 6, 2009 at 21:46
2

Not yet mentioned - there's way more to a typical web page download these days than the text your see rendered in your browser. If the page you are visiting has the ability to be edited, it probably contains a lot of code to handle that. TinyMCE is a popular javascript "Rich Text" editor for the web. It's tiny but it not that tiny.

TinyMCE

This is just one example, but this sort of thing bloats all kinds of web pages and can make your browsing experience not what you expect. Depending on the person authoring the web page or web application, you may end up downloading an app like this whether you ever use it or not. It's just loaded into memory, waiting.

Another aspect is psychological. When you select a file for download, you expect to wait for it to arrive. When you click a link to a page, you more inclined to expect instant gratification, so wqhile I'm not saying 'it's all in your head', there is definitely an expectation there.

1
  • @DaveParillo this is also something I dint know. I had an idea, you confirmed it.
    – Lazer
    Oct 8, 2009 at 10:09
1

For a download, the connection is negotiated at the start of the file transfer and your speed picks up to normal. That part of file transfer is slow (as you may sometimes see in your web browser status bar.. sending request to [site]... waiting for reply from [site] and it takes a while). Every time you request a web page, that same negotiation goes on. It could also be that the server may be slow at responding to requests due to load, or your browser is slow at rendering data.

1
  • this makes sense.
    – Lazer
    Oct 6, 2009 at 21:41
0

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.

1
  • @Raynet Windows Vista, Firefox 3.5, memory is not a problem (3GB), my connection is a leased line shared by some 300 people.
    – Lazer
    Oct 8, 2009 at 10:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .