Maintaining State
State
- HTTP sessions are stateless
- HTTP sessions only last from browser request to server reply
- To manage things like shopping carts, session info needs to be kept
or restored
Cookies
- Cookies are identifiers with no particular meaning
- They are delivered from servers to clients
- The client stores them for a period of time
- On each request to that same server, the cookie is included in the request
- The server can use this cookie to restore state it collected earlier,
indexed by this cookie
Hidden Fields
- A field in an HTML Form may be labelled as "hidden"
- This will nto show in the form
- The value of the field will be set by the server
- When the form is submitted, it will be returned to the server
- State information can be placed in these fields
- For privacy, this should not contain personal information
Jan Newmarch (http://jan.newmarch.name)
jan@newmarch.name
Last modified: Wed Mar 29 13:07:54 EST 2000
Copyright ©Jan Newmarch