Purpose of Using Cookies

Let's see what cookies are used for.

Identifying users

HTTP is what they call a stateless protocol. The server processes a request, and when the response has been delivered, the server forgets all about that request and starts processing the next request. There is no link between these requests, not even a way to know if a request comes from the same person as the previous request, unless you find a way to pass data between requests. This is what cookies are for.

Get hands-on with 1400+ tech skills courses.