|
|
The Hypertext Transfer Protocol(HTTP) is the protocol utilized to communicate between web browsers such as Netscape and Microsoft’s Internet Explorer and Web servers. Thus, HTTP is the protocol used for Web Transactions. The remote machine (Web Server) waits for request from clients (Web Browser, HTTP Clients) for specified documents. The addresses of web servers are stipulated in the web browser using the Uniform Resource Locators (URL), which is an address on the web. A URL uniquely identifies each document. The syntax of a URL consists of the name of a host server and the path to the document requested on the server. An example of a URL is http://www.cthefuture.com/stable/crackajackpedigree.htm. This URL retrieves a document called crackajackoedigree.htm in the stable directory on the web server www.cthefuture.com. Types of web document include Hypertext Markup Language (HTML), Extensible Markup Language ((XML ), Portable Document Format (PDF), graphics interchange format (GIF), etc.
Client connects to web servers usually on designated port which is port 80. Clients issue a send document request. This is usually the HTTP Method, GET, followed by a document address, and an HTTP version number. An example would be GET /index.html HTTP/1.1. The client responds with header information to inform server of its configuration and document format. This response is given line by line.
Example
User-Agent: Mozilla/4.05(WinNT; I) Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* <Blank Line> Client may send additional information |
HTTP/1.1 200 OK Date: Fri, 2o Sep 1998 08:17:58 GMT Server: NSCA/1.5.2 Last-modified: Mon, 17 Jun 1998 21:53:08 GMT Content-type: text/html Content-length: 2482 <Blank Line> |
If client’s request is successful, the requested data is sent. This could be a file or response from a Common Gateway Interface (CGI) Program. If the request is unsuccessful, additional human readable data sent to explain why the server could not fulfill the request.
The server keeps the connection kept open for further requests. However, HTTP is a stateless protocol. HTTP does not maintain any information from one transaction to another. This allows the server to serve a lot more clients in a given period of time. Web developers that need to track sessions from one connection to another are required to use hidden fields or cookies to maintain information from one transaction to another. Some new web servers allow the maintaining of a session state for each connected user for a given amount of time. This feature is Web Server dependent and not part of the HTTP Protocol.
Client requests contain three Sections. Section one contains the HTTP Command, URL that identifies the file or resource the client is querying, and HTTP version number. Section two contains the header information, which provides information about the client and the data entity it is sending to the server. Section three contains the entity body which is the data sent to the server.
A Method is an HTTP command that begins the first line of a client request. A method stipulates to the server the purpose of the client request.
Persistent State, client-side cookies were introduced by Netscape Navigator to enable a server to store client side specific information on the client machine and use the information when a server or a particular page is accessed again by the client. Cookies were required because the HTTP Protocol was a stateless protocol. Cookies permit web developers to personalize pages for each client. Cookies add extra header information to a response. The response contains an identifier for that user. The header informs the cookie-enabled browser to add information to the client’s cookie file. Cookies are stored on the client hard drive. Clients (browsers) should be able to store 300 cookies. The size of a cookie cannot be greater than 4K. A limit of 20 cookies per server or domain.