This is the server that will support the sessions. And the server is responsible for session resolution. Customers do not have to worry about sending any information explicitly. Since the Client can send Cookies stored on the client with each request, the server can use Cookies to track sesssion.
Note. Cookies are just one way to implement session tracking. This is also the best way.
Thus, the server uses cookies as one of the ways to handle session tracking.
This can be done in other ways:
URL rewriting - the application / server should add a session identifier in all URLs / links. When they are called from the client, the session comes to the server along with the URL.
Hidden form fields . Forms may contain a hidden input type with a session identifier as the field value. When the form is submitted, the session identifier is followed by the form data.
source share