Page 252 -
P. 252
anatomy of a web request
Webapps Up Close
No matter what you do on the Web, it’s all about requests and responses. A web request is sent
from a web browser to a web server as the result of some user interaction. On the web server, a
web response (or reply) is formulated and sent back to the web browser. The entire process can
be summarized in five steps.
Step 2: The web
I just type the browser converts
web address into my the user’s action
browser’s location bar into a web request
Step 1: Your user enters and press Enter... and sends it to a
a web address, selects server over the
a hyperlink, or clicks a Internet.
button in her chosen
web browser.
The Internet
Here comes a web
request.
Hey, hello there...what’s this?
A web request just for me? How
nice...
Deciding what to do next
One of two things happen at this point. If the web request
is for static content—such as an HTML file, image, or
Web anything else stored on the web server’s hard disk—the web
Server server locates the resource and returns it to the web browser as
Step 3: The web server a web response.
receives the web request
and has to decide what If the request is for dynamic content—that is, content that
to do next. must be generated—the web server runs a program to produce
the web response.
216 Chapter 7