Answer the question
In order to leave comments, you need to log in
Why does one resource use multiple cookies?
I was interested in looking at cookies in the browser itself. It turned out that one site can use several cookies.
Question: why multiple? Wikipedia describes the mechanics of how cookie transfer works:
- The server receives the username and password, checks them and, if they are correct, sends a successful login page, attaching a cookie with some session ID.
- Every time a user requests a page from the server, the browser automatically sends a session ID cookie to the server. The server checks the identifier against its database of identifiers and, if there is such an identifier in the database, “recognizes” the user.
Answer the question
In order to leave comments, you need to log in
In addition to the session ID, you can store anything.
For example, the ID of the last message that you read, and the next time you visit from your browser, you can show you new ones, and not store it all in the database.
And in general, you can store a bunch of critical or non-critical information.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question