Java Reference
In-Depth Information
Just as was done with the <img> tags, the above URLs must be converted into their
fully qualified form. The above list, when converted into fully qualified form, will give the fol-
lowing five URL's:
• http://www.httprecipes.com/
• http://www.httprecipes.com/
• http://www.httprecipes.com/1/
• http://www.httprecipes.com/1/1/
• http://www.heatonresearch.com/
As can be seen, some of the <a> tags convert to the same target. For example, two of
the tags will open the URL http://www.httprecipes.com/ .
When a user chooses one of the links, the URL is moved to the address line of the brows-
er. The new URL will be handled as if the user had specifically requested the page by typing
the URL into the address line of the browser. This process repeats as the user selects more
and more pages.
So far HTTP requests have only been discussed as abstract concepts. The actual make
up of an HTTP request has not yet been discussed. This will be covered in the next section
where the structure of an HTTP request will be examined.
HTTP Requests and Responses
In the last section HTTP requests generated during a typical surfing session were exam-
ined. Now these requests will be examined in detail. First, the different types of requests will
be discussed. There are a total of three standard HTTP requests that are commonly used:
• GET
• POST
• HEAD
The GET request is the most common request. Any time the user enters a URL into a
web browser, a GET request is issued. Additionally, each hyperlink followed, or image down-
loaded is also a GET request.
The POST request is usually the response to an HTML form. Whenever a form is filled
out and submitted, a POST request is being issued.
The HEAD request is rarely used. It allows only the HTTP headers to be requested. The
actual contents of the “file” requested will not be sent. A web browser will not generate the
HEAD request; however, some search engines make use of it to determine if a URL is still
valid. Because the HEAD request is not generated by a web browser and is of little real use
to a bot, this topic will not discuss it further.
Search WWH ::




Custom Search