Java Reference
In-Depth Information
As can be seen from the above listing, there are a total of five <img> HTML tags. The
following five tags are found:
• <img src="/images/logo.gif" alt="Heaton Research Logo" border="0">
• <img src="beach.jpg" height="240" width="320" alt="Beach">
• <img src="ship.jpg" height="240" width="320" alt="Battleship">
• <img src="birds.jpg" height="240" width="320" alt="Birds">
• <img src="flower.jpg" height="240" width="320" alt="Beach Flowers">
Once the HTML has been downloaded, it is scanned for <img> tags. These <img>
tags will cause other requests to be generated to download the images. The above tags are
converted to the following five URL's:
• http://www.heatonresearch/images/logo.gif
• http://www.heatonresearch/1/1/beach.jpg
• http://www.heatonresearch/1/1/ship.jpg
• http://www.heatonresearch/1/1/birds.jpg
• http://www.heatonresearch/1/1/flower.jpg
As can be seen from the above list, the requests are given in fully qualified form. The
URL for the file beach.jpg is given in the form:
http://www.httprecipes.com/1/1/beach.jpg
The URL would not be in the form “ beach.jpg ” as it is represented in the HTML file.
Since the web server has no idea what page is currently being browsed, a web browser must
fully qualify every request that is sent.
A Typical Surfing Session
Once the user is browsing the “typical web page,” examined in the last section, they will
not likely stay there long. The typical web user will “surf,” and visit a large number of pages.
The typical web page example contains five different pages that the user may choose to surf
to. All of these pages are linked to with anchor tags <a> . The following anchor tags are
found in Listing 1.1:
• <a href="http://www.httprecipes.com/">
• <a href="/">
• <a href="/1/">
• <a href="/1/1/">
• <a href="http://www.heatonresearch.com/">
Search WWH ::




Custom Search