Hi, I am going through HFSJ,chapter 1 which says that when ever the browser is rendering the html page and it comes across the image tag , it generates another HTTP request to get the resource descirbed. I wanted to know why a new HTTP request has to be sent to server for each image tag.
A HTTP request is able to send one resource. When you request a web page, you get sent the web page. Extra 'bits' like images, fonts, favourite icons, sounds and animations are 'new' resources and they must be loaded separately with new HTTP requests.
A new HTTP request does not always require a new HTTP connection though. As a performance improvement in HTTP1.1, it supports a 'Keep-Alive' connection so that multiple requests can be sent down one connection without needing to keep establishing new connections.
Dave
Rahul Juneja
Ranch Hand
Joined: Aug 03, 2002
Posts: 425
posted
0
Hi,
As David Allready told you HTTP cannot get extra bits of images and other such things in one hit, So it has to make an extra call. Also as HTTP is a stateless protocol so for every resource it has to make a seperate call to the server.
Well, normally I would move this to the HTML forum since it is not a question about Servlets. But since there are already good responses here, I am just going to close this thread.