Why is the browser closed and the session and cookies cleared?
I don’t know what the problem is. The browser has been closed and both are gone
Why is the browser closed and the session and cookies cleared?
I don’t know what the problem is. The browser has been closed and both are gone
The default cookie life cycle is during the browser session, and the cookie expiration time can be set
http://blog.sina.com.cn/s/blo...
Cookies will not be cleared if the browser is turned off
The validity of cookies is the same as that of a browser. If the browser is closed, the cookies will be automatically cleared and the session will also become invalid.
If you want the cookie to remain valid after closing the browser, you need to set the cookie validity time.