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

query on setMaxAge method of Cookie class of servlet api?  RSS feed

 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please refer the url at http://docs.oracle.com/javaee/6/api/javax/servlet/http/Cookie.html#setMaxAge(int)

it says that "negative value means that the cookie is not stored persistently and will be deleted when the Web browser exits. A zero value causes the cookie to be deleted".

i did not get the difference between the two. in both cases cookie will be deleted. whats the difference ? Please help
 
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
Immediate versus when the browser closes.
 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Immediate versus when the browser closes.


Thanks alot Bear Sir
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!