Readings for Week 2


Concept Reading

Form Processing Examples

* textbox.html. A JavaScript that displays a textbox's value in an alert.
* select.html. A JavaScript that displays the selected item's value in an alert
* checkboxes-1.html. A JavaScript that displays a selected checkbox's value in an alert
* checkboxes-2.html. A JavaScript that uses the DOM & the selected checkbox to build a category string
* user-prefs-pt1.html. A JavaScript that displays all form data in an alert

examples

Review: CSS from 110 PowerPoint Slides:
ch-4-CSS.ppt
From Software Engineering for Internet Applications by Eve Andersson, Philip Greenspun, and Andrew Grumet

Old-Style Communications Protocols.


In a traditional communications protocol, Computer Program A opens a connection to Computer Program B. Both programs run continuously for the duration of the communication. This makes it easy for Program B to remember what Program A has said already. Program B can build up state in its memory. The memory can in fact contain a complete log of everything that has come over the wire from Program A.
HTTP: Stateless and Anonymous.

You can try it yourself in the Unix shell:

% telnet www.uoregon.edu 80
Trying 216.32.74.53...
Connected to www.yahoo.akadns.net.
Escape character is '^]'.
GET / HTTP/1.0

(request ends with a double newline)

(Server response followed by a blank line and text of the requested page):

HTTP/1.1 301 Moved Permanently
Date: Wed, 30 Jan 2008 21:38:40 GMT
Server: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8d DAV/2 PHP/5.2.4
Location: http://www.cs.uoregon.edu/
Content-Length: 359
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.cs.uoregon.edu/">here</a>.</p>
<hr>
<address>Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8d DAV/2 PHP/5.2.4 Server at cs.cs.uoregon.edu Port 80</address>
</body></html>
Connection to cs.uoregon.edu closed by foreign host.

Internet Cookies

In HTTP the connection is closed after a single request/response pair, by default.

HTTP is a stateless protocol.

Wikipedia Entry:
sections 1 (purpose) - 5 (privacy & 3rd party)

"Cookies and Client-side Persistence," Ch. 19, JavaScript: The Definitive Guide, by Flanagan (O'Reilly).

Persistent Connections

HTTP session state