Set the validity period of the cookie object, The setmaxage () method can set the validity time of the cookie object,
E.g:cookie c=new cookie ("username", "john");
c.setmaxage (60);//60 seconds mean
c.setmaxage (60 * 60);//one hour
c.setmaxage (365 * 24 * 60 * 60);//one year
If you do not set an expiration time,It means that the cookie life cycle is during the browser session,Just close the browser window,The cookie disappeared.
This type of cookie with a lifetime of a browsing session is called a session cookie. Session cookies are generally not stored on the hard drive but in memory.
If an expiration time is set,The browser will save the cookie to your hard drive,Open the browser again after closing,These cookies remain valid until the set expiration time.Cookies stored on your hard drive can be shared between different browser processes,For example two ie windows. As for cookies stored in memory, different browsers have different processing methods.
When cookie.setmaxage is set to 0, the specified cookie will be deleted on the browser immediately.
When cookie.setmaxage is set to -1, it means that closing the current browser is invalid.
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- i want to call a child component method from a parent in vuejs
- xcode - pod install [!] no `podfile 'found in the project directory
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file