JavaScript Cookies and Sessions Tutorials
HTTP is stateless, which means that the protocol does not have a memory. A client opens a connection to a server, retrieves a document (or an image or any other data), and then closes the connection. The next time data is sent to this specific client from the server, the server does not recognize the client. Cookies can help work around this situation. A server can send a short bit of text information to the client, the so-called cookie. If this data is accepted and locally saved, the client sends this data back with every request to the same server. This enables the server application to recognize the user again.