Ford & Mason Ltd
HOME
ABOUT
CONTACT
RESOURCES
ADVERTISING



donations support the development of
cronolog.org
and
refcards.com

next up previous contents index
Next: Minimizing response times Up: Techniques and considerations Previous: Techniques and considerations


Keeping state information

The 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 gif).


[ITCP]Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout using the Template Toolkit. The document is mainly of historical interest as obviously many of the sites mentioned have long since disappeared.

 
Copyright © 1996-2002 Ford & Mason Ltd