The website verifies the respective advantages and disadvantages of cookie/session?

if I only use cookies for verification, what is the optimization and can I make up for it?
where is session better than cookie?
Please give me some advice, thank you!

Apr.14,2022

first understand the difference between session and cookie
can be explained by a database table, session can be understood as the entire data table, while cookie is just to find the guidance of a row of data


generally cookie is used to store sessionId, through the sessionId returned by cookie to read the exchange information saved by the server, cookie can also store some insensitive data information. Cookie is equivalent to distributing user data to various distributed clients, while session stores data on the server.

Menu