why some webpages are still half loaded even we are using TCP as an underlying protocol?
3 года назад+4
Websites are basically HTML files. Let say, someone wants to display an image, she will have to specify the link to the image inside the HTML file. When you go to her website, you request the HTML file of the site. So the browser will firstly get the HTML file and read it. The browser notices the HTML file contains an image, so it starts downloading the image (by the link given in the HTML file), while doing that, it also renders the page at the same time. Because in most cases, the image file is much larger than the HTML file, so the browser will display the website without the image first, this is when you call it "half loaded". Then when the browser has finished downloading the image, it'll display the image where the HTML file tells it to. The TCP is used separately for the HTML file and the image file. This means it only makes sure that you receive the whole HTML file intact, OR the whole image file intact. It cannot make sure you receive both the HTML and the image.
Much appreciated. We're using the same textbook and this is very helpful.
The visuals are extremely helpful in these lectures, thank you, this material is a perfect appendage to the book.
Thank you for uploading your lectures to youtube! helped me with my high school final exam:)
Definitely a better explanation than my teacher's
Thanks a lot!
Thanks a lot.
Wuao¡¡ What a classroom many thanks
thx a lot : )
why some webpages are still half loaded even we are using TCP as an underlying protocol?
Websites are basically HTML files. Let say, someone wants to display an image, she will have to specify the link to the image inside the HTML file.
When you go to her website, you request the HTML file of the site. So the browser will firstly get the HTML file and read it. The browser notices the HTML file contains an image, so it starts downloading the image (by the link given in the HTML file), while doing that, it also renders the page at the same time. Because in most cases, the image file is much larger than the HTML file, so the browser will display the website without the image first, this is when you call it "half loaded". Then when the browser has finished downloading the image, it'll display the image where the HTML file tells it to.
The TCP is used separately for the HTML file and the image file. This means it only makes sure that you receive the whole HTML file intact, OR the whole image file intact. It cannot make sure you receive both the HTML and the image.