0

I am working on "Keep Me Log in" part of a site.However, when I close the chrome, only local cookies that I am working on are deleted. Other cookies from other sites remains. Does it have to be like that or is there any option for not-deleting the local cookies?. Thanks.

1 Answers1

0

You need to be more specific.

There's cookies and localStorage, it's 2 different client persistance option. Neither get delete by navigator (Unless you're in private browse).

Cookies have a lifetime, maybe you don't set it right. Are you using a framework that can interferr here ?

Moreover, Chrome doesn't support cookies on localhost.

GMartigny
  • 126
  • 8
  • I used following statement to declare the cookie : "HttpCookie is_remember_cookie = new HttpCookie("is_remember"); " Actually I do not know how to specyf the lifetime of a cookie – user3783144 Aug 07 '15 at 13:54
  • As far as I do not close the explorer, when I open new tab, it reads the cookie and does what I want. – user3783144 Aug 07 '15 at 13:58
  • That's it, by default the expiration time is "session", so it's destroy when you close your browser. http://stackoverflow.com/questions/19002254/what-is-the-default-expiration-time-of-a-cookie – GMartigny Aug 07 '15 at 14:03
  • Mark the question as answered, it may help someone else one day. – GMartigny Aug 07 '15 at 14:44