The Web as a Protocol: Requests, State and Caching · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

A protocol that remembers nothing

Computing · Networks & Security · ages 19-21
Name ______________________   Date ____________
  1. What does it mean that the protocol is stateless?

    • It remembers nothing between requests
    • It never sends any response
    • It works without any network
  2. Which parts of a request carry meaning?

    • The screen size and the mouse position
    • The method, path, and headers
    • The cable length and the plug shape
  3. What do caching headers decide?

    • The price of the server
    • The color of the page
    • What may be reused and for how long
  4. A logo loads instantly on repeat visits but news text refetches. Why?

    • Headers allow long reuse of the logo only
    • The server ran out of news
    • Cookies blocked the logo
  5. You log in, then open a second page and are still logged in. How?

    • The server memorized your face
    • Your browser sent the cookie with the new request
    • The protocol changed its design
  6. A cookie lets a stateless protocol support a logged-in session.

    Circle one:   True   False

  7. An intermediate cache may serve a stored copy while its caching header still allows it.

    Circle one:   True   False

  8. A user clears cookies mid-shop and the cart empties. A teammate blames the cache. What is wrong?

    • Caches store pages, while the cart lived in the cookie session
    • Clearing cookies speeds up caching
    • Carts never use any network at all
LightMySky · lightmysky.comW1-mt_MDiW4Vt0bo-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

A protocol that remembers nothing W1-mt_MDiW4Vt0bo-s1

  1. It remembers nothing between requests · Each request stands alone with no memory of earlier ones.
  2. The method, path, and headers · Method, path, and headers tell the server what you want.
  3. What may be reused and for how long · They set reuse rules for the browser and the caches between.
  4. Headers allow long reuse of the logo only · Different headers give the logo a long reuse life and the news a short one.
  5. Your browser sent the cookie with the new request · The session lives in the cookie, which travels with every request.
  6. True · The token is resent each time, so the server knows you again.
  7. True · Headers bind the caches between you and the server too.
  8. Caches store pages, while the cart lived in the cookie session · The session token was deleted, so the server no longer knows the cart.
Worksheet · LightMySky