Statefulness in a Stateless Web

What are sessions and cookies, and why do we need them?

Victoria Murray
6 min readFeb 6, 2019
HTTP Get Request for the Mozilla Docs in French.

If I passed you this note, what would you write back? Maybe you’d be like “🤔❓🤷” and send back a 404, but maybe you’ve read up on HTTP messages, so you’d know what to respond with (which is, kinda, this). 🌐

What is HTTP?

HTTP (Hypertext Transfer Protocol) is how we send data on the web. HTTP can send files containing text, images, video, sound, and any other multimedia you run into on the web. When a user wants to navigate to a different webpage, the browser will create an HTTP request and send it to the IP address indicated by the URL of that webpage.

When you opened this article, your browser (the client) sent a request to Medium’s servers that loosely said, “Hey, GET me this article please!”. Then Medium responded with the files required for your browser to render what you’re reading right now. This communication between the client and server is called the Request-Response Cycle.

When your browser sent a GET request to Medium asking for this article, it asked for the files related to this URL you’re visiting—but it…

--

--