---
title: "The Web as a Protocol: Requests, State and Caching"
description: "The web runs on a request and response protocol that remembers nothing between calls, so any sense of a session is built on top with cookies or tokens. Caching headers decide what may be reused and fo"
canonical: https://lightmysky.com/learn/computing/the-web-as-a-protocol-requests-state-and-caching-mt_MDiW4Vt0bo
source: https://lightmysky.com/learn/computing/the-web-as-a-protocol-requests-state-and-caching-mt_MDiW4Vt0bo.md
retrieved: 2026-09-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# The Web as a Protocol: Requests, State and Caching

The web runs on a request and response protocol that remembers nothing between calls, so any sense of a session is built on top with cookies or tokens. Caching headers decide what may be reused and for how long, which is most of what makes the web feel fast.

Subject: Computing · Area: Networks & Security · Ages 19 to 21
Page: https://lightmysky.com/learn/computing/the-web-as-a-protocol-requests-state-and-caching-mt_MDiW4Vt0bo

## Ready when they can

- Read a request and response pair and name the parts that carry meaning
- Explain how a stateless protocol supports a logged-in session
- Say what a caching header changes for a browser and for an intermediate cache

## Lesson: A protocol that remembers nothing

The web runs on requests and responses. Your browser sends a request with a method, a path, and headers. The server answers with a status, headers, and a body.

The protocol remembers nothing between calls. Each request stands alone, with no memory of the last one. That forgetfulness is called stateless.

**Example.** Logging in sets a cookie in your browser. Your browser then sends that cookie with every later request. The server reads it and knows it is still you.

**Tip.** Caching headers say what may be reused and for how long. The browser keeps its own copy, and so do caches in between. That reuse is most of what makes the web feel fast.

**Recap.** Requests forget, cookies remind, and caching headers decide what gets reused.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [How a Web Page Reaches Your Screen](https://lightmysky.com/learn/computing/how-a-web-page-reaches-your-screen-mt_8JveAW2Mg7)
- [Routing: How a Path Is Learned](https://lightmysky.com/learn/computing/routing-how-a-path-is-learned-mt_gyqPDrV6Uo)

## Opens up

- [TLS: Putting the Pieces Together](https://lightmysky.com/learn/computing/tls-putting-the-pieces-together-mt_JzIwi-BYG0)
- [Clocks, Ordering and Happens-Before](https://lightmysky.com/learn/computing/clocks-ordering-and-happens-before-mt_ratia1eb_2)
