Cookie|js
1. Browsers generally only allow 300 cookies, each site has a maximum of 20 cookies, each cookie size is limited to 4KB.
2. The contents of cookies are mainly: name, value, time, domain, path.
If the cookie is not set to time, it is only alive during the browser session, called the session cookie
Session cookies are generally stored in memory, not on the hard disk, and the general cookie is stored on the hard disk.
3. Reading cookies from the client is generally 2 steps:
A. Call request. GetCookies () gets an array;
B. Iterate the array, using the GetName () of each cookie to find the cookie that is interesting.
4. If the request does not contain a cookie, the array returned by getcookies is null.
5. SetPath () The path specified must include the current page
GetPath ()
If you want to specify that the cookie applies to all URLs on your site, use Cookie.setpath ("/").
6. Session Cookies and persistent cookies
The former is only present in the current browser and the latter can be saved for use at the next browser startup