Basic HTML version of Foils prepared 23 June 1997

Foil 71 Specification of a Cookie - I

From JavaScript Tutorial for Certificate Course UC Web applications Certificate -- Summer 97. by Geoffrey C. Fox, Tom Scavo


name=value; EXPIRES=dateValue; DOMAIN=domainName; PATH=pathName; SECURE
name is required and gives the name of cookie
EXPIRES is optional but if present specifies a date after which cookie should be deleted
EXPIRES uses a modified syntax returned by JavaScript function Dateobject.toGMTString(timevalueinseconds)
  • dayofweek, Day-Month-Year Hour:Min:Secs GMT
  • e.g. Wednesday 19-02-97 19:10:24 GMT
It appears that one can just use a slightly different syntax of toGMTString:
  • now = new DATE();
  • now.setTime(now.getTime() + 24*60*60);
  • now.toGMTString() // one day from now!



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 Wed Apr 1 1998