Sessions and Cookies
One very important concept that all Web-Developers must know of is Sessions . Now most of us may already be familiar with the term, but read on to know what is it exactly and why do we need them so much. Let's start off by understanding a little bit about HTTP requests. But before that please make sure you have an Idea of Servers, Clients, and Browsers . An HTTP request is made by your browser whenever you connect to a Website or a Web-app. Whenever an HTTP request is made by the browser the following happens: An HTTP connection is opened. A URL, headers, and request body (if required) are sent. The server responds with an HTTP response: status_code, headers and response body. The HTTP connection is closed. Now, this format has a problem. That is HTTP is a stateless protocol. That is One HTTP request made by the browser actually has nothing to do with any other HTTP request. From the server’s point of view, all HTTP requests are completely independent. The problem i...