This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cookie Expiration  RSS feed

 
Ty Caine
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone.
I'm setting a cookie with the following code:



then using a loop within the body of the page to retrieve the cookie name(s) and value(s), and yet when I request the MaxAge of the cookie(s) on the page with cookies[i].getMaxAge() it comes back as -1, even though it was originally set to 31536000.


Am I being dense, or am I missing something here?
Can anyone help me?
Thanks in advance
T.C.
[ January 31, 2003: Message edited by: Ty Caine ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are doing all this in one request, seems to me that since you are setting the cookie in the response, it won't appear until the next request.
Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!