|
|||||||||
|
Keeping state informationThe Web is essentially a stateless system. Connections between the browser and the server only last for the duration of a single transaction and, apart from the server logs, no information on past transactions is kept. It is possible to create applications that maintain a virtual connection to the browser, but this has to be done within the CGI program. One technique is to include state information in the URLs of links embedded in HTML documents that are generated. For example, in the Electronic Beowulf system, the current image (folio), magnification factor and offset of the window onto the complete image are encoded as:
/imgshow/folio/mag-factor/x-offset,y-offset The imgshow component identifies the script, which receives the rest of the URL in the PATH_INFO variable. The parameters required to identify the current image view can be extracted from this. Where interaction via forms is appropriate, the state information can be encoded in a hidden field (see Section ).
Spinning the Web by Andrew Ford |
||||||
Copyright © 1996-2002 Ford & Mason Ltd |