File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes HTTP Request + web resources Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTP Request + web resources" Watch "HTTP Request + web resources" New topic

HTTP Request + web resources

kumar thokkala

Joined: Apr 12, 2004
Posts: 24
Hi Guys,
I have question regarding the resouces loaded in a web page by a HTTP Request. In a simple html web page if I have some images, does the HTTP makes a individual call for each image? or does it get all the contents of the web page along with images in one request?

Any pointers to support your answer would be great.

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

kumar kuamr,
Welcome to JavaRanch!

We're pleased to have you here with us in the servlets forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here

As to your question:
Yes, a separate call gets made for each image.
There can only be one response per request in HTTP.

Any pointers to support your answer would be great.

A great tool for understanding how HTTP works is the LiveHttpHeaders plugin for FireFox. With it, you can see the request and response headers as they're being made.
[ August 01, 2006: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link:
subject: HTTP Request + web resources
It's not a secret anymore!