HELP! * GREY=local LOCAL HTML version of Foils prepared 15 January 1997

Foil 69 Cookies - "hidden" alternative

From JavaScript Tutorial for CPS616 Technologies of the Information Age 1997 Basic Information Track of CPS -- Spring Semester 97. by Geoffrey C. Fox * See also color IMAGE

Cookies were introduced by Netscape to preserve client side state
If you have a CGI script that services several clients (ordering T Shirts perhaps), it is neatest to use client and not server to store information such as name of user, passwords etc.
Traditionally used as passed in forms using "hidden" fields
  • <INPUT type=hidden" name="user" value="" >
  • set by formname.user.value = WHATHAVEYOU;
Such hidden fields are passed to CGI scripts in same fashion as other variables set in form text fields
hidden values can either by set by JavaScript on client side or returned built into a page constructed by CGI script which might read N values and return a new form with M new fields for user and N old entries preserved in hidden fields
So hidden variables are nice but only preserved as long as you keep to page you started with or that returned by CGI script.



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat May 24 1997