previous | start | next

Maintaining State -- Session Management

A shopping cart application is more difficult to implement than it may seem. Because the HTTP protocol is stateless, a Web server regards every connection as entirely new, with no relationship to any previous or future connections.
 
Most modern Web Commerce sites use the concept of a Web session -- a series of Web requests and responses linked together by a state variable called a session identifier. A first visit to the sites "home page" creates a new session, and the HTTP response is associated with a new session identifier, or SID. All subsequent transactions are somehow labelled with the same SID.
 
There are three Web technologies availabe to support session management: Hidden Fields, Cookies and URL-embedded Information. Modern practice is to use a "belt-and-braces" approach, incorporating all three.
 
Lecture 8: Web Commerce Technologies Copyright © 2005 P.Scott, La Trobe University Bendigo.


previous | start | next