How node req.session writes data to cookie

for example, the
backend code is as follows:

self.req.session.user= userId;

data in browser

clipboard.png
how do you do that? Which strings and times are assigned values?

Mar.01,2021

https://github.com/expressjs/. can take a look here


response with set-cookie header


The

client (browser) sends a http request to the server, and the server replies a http response to the client. This response contains some important header fields, including the Set-Cookie field. As the name implies, this field tells the browser to update the cookie of the corresponding site according to the content in the Set-Cookie field of the response. So the browser obediently sets cookie to what you see as the server says. For more information, search for the keywords "http request" and "http response", or "http header field"

in addition, session and cookie are two different things, except that session needs to be marked with cookie .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4f634-43b07.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4f634-43b07.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?