This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cookies expiration date problems  RSS feed

 
Daniel Cote
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I'm beginig working with cookies in Java.

I have some weird behaviours. I'm learning with a testing cookie. First, I have set the expiration time of my test cookie (setMaxAge()) in the cookie creation before add it to the response. I need to recover the expiration date of the cookie later, but when I do, the method I guessed that was intended for this (getMaxAge()) always return -1;

Another think I don't understand it's that in spite of the -1 returned by getMaxAge() the cookie expires at correct time (internet explorer and firefox). Also I see the correct expiration date of the cookie with internet explorer (in temporary folder) but with firefox (cookies window wiew) it says that the cookie will expire at session ending (in spite of it expired in the set time).

Please help, I'm a bit annoyed about these behaviours.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Yokese ATE", please check your private mesasges for an important note from me.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!