Interview: How Browser Cookies Actually Work🍪
How Websites Remember You After You Close the Browser! Browser cookies are why you stay signed in and your cart stays full when you come back the next day. At login, the server creates a random session ID, saves it next to your account, and sends it to your browser in a Set-Cookie header.
KodeKloud