cookie key technology

A cookie is created on the server side.

The second  cookie is saved on the browser side, and the storage path is as shown in the screenshot below.
Three cookie life cycle can be set, if the life cycle is not set, when the browser is closed, the cookie will die.
Quad cookies can be shared by multiple browsers on the same machine.
Fifth, you can think of a cookie as a table, and the table fields are composed of (name, value).
6. If the two cookies created by the server have the same name, the later created cookie will replace the first created cookie.
Seven a web application can store multiple cookies.
When eight cookies are stored, they are stored in plain text, so the security is low, and they can be stored after encryption.
Nine cookie life cycle description
1. The default life cycle of cooke is session level.
2. Through setMaxAge(), the cookie life cycle can be set.
setMaxAge (positive number): how many seconds after the cookie expires.
setMaxAge(0): delete the cookie.
setMaxAge (negative number): equivalent to the session level, exit the browser, and the cookie will be invalid.
Eleven browsers can put up to 300 cookies, a site can have up to 20 cookies, and the size of each cookie is limited to 4k.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326679948&siteId=291194637