The Understudy

Director's notes

How it works

  1. The server answers every missing address with status 404 and this theatre.
  2. The page reads the address and works out what most likely went wrong: a missing letter, a swapped pair, a stray bracket from a chat message, a robot looking for WordPress.
  3. It finds the closest real page and puts it on the first screen as the way out.
  4. Then the understudy dresses up as the page you wanted, in cardboard, and performs it. Pull the costume off and the plain 404 is underneath.

Why a ghost light

Theatres leave one bare bulb burning on the empty stage overnight, the ghost light. Some say it's for safety. Some say it's so the theatre's ghosts can perform. A missing page is a dark stage; this one keeps the light on.

Accessibility

The way out comes first in the page and works without JavaScript. Everything on stage can be done with a keyboard. Screen readers get the script as text. Reduced motion turns off every animation. Sound is off until you turn it on.

Privacy

No cookies, no trackers, no requests to other sites. A visit count and the last ten lost addresses stay in your browser's local storage under the key understudy.v1.

Offline

After one visit, a service worker keeps the theatre in your browser, so a missing page still has an understudy when the network is gone.

Status codes

Real pages answer 200. Every missing address answers 404, including /404 itself. Addresses with a trailing slash or .html on a real page redirect once with 301.