Basic HTML version of Foils prepared 11 March 99

Foil 6 Specification of a cookie - I

From Overview of JavaScript II -- From Cookies to Dynamical HTML CPS616 Technologies of the Information Age -- Spring Semester 99. by Geoffrey C. Fox (Tom Scavo)

Authoring Guide, Using Cookies
1 name=value; EXPIRES=datevalue; DOMAIN=domainname; PATH=pathname; SECURE
2 name is required and tells you name of cookie
3 EXPIRES is optional but if present specifies a date after which cookie is to be deleted
4 EXPIRES uses a modification of syntax returned by JavaScript function Dateobject.toGMTString()
  • dayofweek, Day-Month-Year Hour:Min:Secs GMT
  • e.g. Wednesday 19-02-97 19:10:24 GMT
5 It appears that one can just use the slightly different syntax of toGMTString as well as "official format"
  • so now = new DATE(); now.setTime( now.getTime() + 24*60*60*1000);
  • now.toGMTString() will give an expiration date of one day from now!

in Table To:


© 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 Thu Mar 11 1999