Explain the initial browser-server interaction on a Web site.
Browser-server Communication in ASP
When you enter a URL into a Web browser program, you are really initiating a computer-to-computer exchange. Your browser sends a request to a server, and the server responds. Both the request and response are in Hypertext Transfer Protocol (HTTP), the common language for requesting and sending files (Web pages, text, graphics and other binary files) over the Web. When a browser first contacts a Web server, each identifies itself to the other and exchanges information on the file types, features, and languages each supports. Later lessons will explain how ASP programs can store the information exchanged in this process and create an appropriate response. This following series of images illustrates a typical browser-server initial exchange, often called a handshake:
1) A client computer and browser initiate the sequence
2) Baseball Scores
3) Send along additional information
4) Header information ends with a blank line 5) Server response begins with a status line 6) The server sends header information 7) The requested document is sent
How an ASP page responds to a browser request
HttpRequest.Browser Property
Gets or sets information about the requesting client's browser capabilities.
Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
C#
public HttpBrowserCapabilities Browser { get; set; }
Once communication is established, the ASP program can read and store:
The status and header information that accompanies each user request
Information that the Server has written to the user's computer during a previous visit
The next lesson describes the characteristics of ASP's objects.