Using cookies is the simplest and easiest way to track a session. A unique session id (stored in the form of cookie) is sent by the server to the client as a part of the response and the same session id saved with the client is sent to the server as a part of the request which helps the server to recognize the unique client session.