O'Reilly logo

ASP in a Nutshell, 2nd Edition by A. Keyton Weissinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HTTP: A Simple Example

You probably already know that HTTP is a "transaction"-style protocol. The browser (the client) sends a request to the server. The server obeys the request if it can and sends a response back to the client. The server then completely forgets about the transaction. The browser may or may not forget about it.

HELLO.HTM, a simple HTML form

Figure 7.1. HELLO.HTM, a simple HTML form

HELLOCGI.HTM, an HTML page created by a CGI application

Figure 7.2. HELLOCGI.HTM, an HTML page created by a CGI application

To illustrate the interaction between web browser and server, let's examine a fairly simple example that illustrates this exchange. Figure 7.1 shows Netscape Navigator displaying a very simple form, HELLO.HTM, that prompts the user for her name. When the user clicks the Submit button, a CGI application is invoked on a WebSite server that sends back the page displayed in Figure 7.2. (Although Navigator and WebSite are used for this example, the exchange between any browser and any server would be more or less identical. Also, although this example uses a CGI application, the HTTP request/response cycle is almost exactly the same as that for ASP applications. For more about CGI-to-ASP conversion, see Appendix B.) Let's see how this interchange between browser and server are handled by the protocol:

  1. When the user finishes entering the URL for HELLO.HTM ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required