Java Reference
In-Depth Information
This request looks similar to the previous one, except that now, the location /WileyCDA/ is
accessed. The server now happily replies:
HTTP/1.0 200 OK
Date: Fri, 11 Apr 2014 09:45:50 GMT
Server: Apache
X-Powered-By: SPA
Set-Cookie: JSESSIONID=495BF51CF5892A07BBF54D9F6CA32D48; Path=/
Instance: p4
Vary: Accept-Encoding
Content-Encoding: gzip
Connection: close
Content-Type: text/html;charset=ISO-8859-1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Build: R16B063 -->
<!-- Strand Id: 0229556601 -->
<!-- layout( Wrox Homepage ) -->
<html>
<head>
<link rel="canonical" href=" http://www.wrox.com" />
<link href=" http://media.wiley.com/spa_assets/R16B063/site/wrox/include/
style.css" type="text/css" rel="stylesheet" />
<title>Programming Books, Free Code Downloads, Ebooks, Blogs, Articles,
Forums - Wrox</title>
... LOTS OF HTML CODE ...
</html>
<!-- / layout( Wrox Homepage ) -->
Most of the HTML reply is omitted here, as printing the whole thing would take multiple
pages. Just note that the server now replies a 200 status message, indicating the request
could be handled successfully.
Note Many other HTTP status codes exist. Most of us are familiar with the
404 (“Not Found”) status code. One other peculiar “error” status code is 418
(“I'm a teapot”), which was added to the standard as a 1998 April Fools' joke,
but is not expected to be implemented by actual HTTP servers.
10.
The web browser starts interpreting the HTML code and displays the page to the user. The
web browser sees, however, that the page also includes a number of images. For each image,
the browser will have to fire off a new HTTP request. As such, rendering just one web page
might involve a large number of HTTP requests. Modern browsers, such as Firefox and
Chrome, allow you to show a timeline of all requests being made, such as the one shown in
Figure 10-4 for rendering www.wrox.com .
Luckily, browsers are smart and will start rendering the page as soon as information is
coming in, showing images and other visuals as they are retrieved. In addition, as can be
observed from the timeline shown in Figure 10-4, browsers will send a number of HTTP
requests in parallel to speed up the loading process.
Search WWH ::




Custom Search