Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getMaxAge method of Cookie always returns -1

 
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
 
Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!