• Post Reply Bookmark Topic Watch Topic
  • New Topic

getMaxAge method of Cookie always returns -1  RSS feed

 
Parthiban Malayandi
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I learned about cookie so tried to create a one and found that getMaxAge is not worked as I expected.

I setMaxAge to two minutes and I expect when I call getMaxAge it will return two but it didn't instead it always returns -1 .

What is wrong with my code ?


Output
=====



Please clarify me why it always returns -1
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!