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

Foil 73 Use of Cookies in Server Program

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

The Brower passes to server any cookies that are valid for a given page in HTTP header
Note only name=value is passed because PATH DOMAIN SECURE and EXPIRES are used to check if cookie should be passed
The server stores cookie strings in $HTTP_COOKIE environment variable as name1=value1; name2=value2;
  • It is easy for CGI script to decode this $HTTP_COOKIE environment variable
One can send cookies back to client using
Set-cookie: name1=value1; expires= .. ; domain= ...; etc.
before the
content-type: text/html header line



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