Distributed Program Construction

Fall 1999

Lecture 6: WWW



COMP 413

        The Web

Technologies

Components
COMP 413


HTTP Version 1.1 is specified in RFC 2616.

Example exchange: HTTP Request: HTTP Response:



COMP 413 HTTP commands ("methods") HTTP result codes Some request header fields: Some response header fields:
COMP 413 Content caching critical to Web performance and scalability Cache consistency:
COMP 413 Server and Proxy logging
COMP 413 Two authentication schemes (see RFC 2617) Basic Authentication example Digest Authentication (simplified)

COMP 413 HTTP is a stateless protocol Netscape HTTP cookies




COMP 413 Stateless protocol, originally designed for file retrieval Various fixes



COMP 413 HTML applet tag

<APPLET
        CODEBASE = codebaseURL
        ARCHIVE = archiveList
        CODE = appletFile ...or...  OBJECT = serializedApplet
        ALT = alternateText
        NAME = appletInstanceName
        WIDTH = pixels  HEIGHT = pixels
        ALIGN = alignment
        VSPACE = pixels  HSPACE = pixels
    >
    <PARAM NAME = appletAttribute1 VALUE = value>
    <PARAM NAME = appletAttribute2 VALUE = value>
    . . .
    alternateHTML
    </APPLET>
 



COMP 413 Common Gateway Interface (CGI) CGI programs Efficency
COMP 413

HTML Forms

HTML Form tag

Example:
 <FORM action="http://somesite.com/prog/adduser" method="post">
       <P>
       <LABEL for="firstname">First name: </LABEL>
                 <INPUT type="text" id="firstname"><BR>
       <LABEL for="lastname">Last name: </LABEL>
                 <INPUT type="text" id="lastname"><BR>
       <LABEL for="email">email: </LABEL>
                 <INPUT type="text" id="email"><BR>
       <INPUT type="radio" name="sex" value="Male"> Male<BR>
       <INPUT type="radio" name="sex" value="Female"> Female<BR>
       <INPUT type="submit" value="Send"> <INPUT type="reset">
       </P>
</FORM>
Client broswer collects input data in form data set, a string consisting of control-name/value pairs, separated by "&".

Two ways to submit the form data set to the server:


COMP 413 Many services require state across HTTP requests (e.g., shopping)



COMP 413
  via Secure Socket Layer (HTTPS)



COMP 413
COMP 413