AI Focus

malleable accept studio: one url, a manga page, a podcast, or a zine

Why this matters

A URL identifies a resource, not a file format, yet sites mint a new URL for every format (/slides, /podcast.mp3, /print). Content negotiation has carried an Accept header for thirty years, but servers rarely use it to change the mode of a document, so it is unclear how far one canonical URL can stretch before HTTP semantics, registries, or caches push back.

What this opens up

Requesting the same page as comic/manga, deck/slides, audio/podcast, study/flashcards, visual/zine, code/spec-tree, or any invented type/subtype, with honest headers that show which parts are valid RFC 9110 syntax, which are unregistered with IANA, and which multiply cache keys. A deterministic edge compile renders immediately; a browser-side model can then rewrite the text for comparison.

How the tests work

  1. The stage loads with Accept: comic/manga on /pages/hyper-content-negotiation. Switch presets, or edit the header directly with parameters such as comic/manga; reading=ltr; panels=4; tone=noir and q-values such as deck/slides;q=0.4, comic/manga, then read X-Accept-Params-Applied and X-Accept-Params-Ignored in the wire inspector.
  2. Press Download Comic SVG (or curl with ?export=svg) to get the same panels as image/svg+xml. The browser page and the SVG are drawn by one DOM-free scene-graph module, so both outputs match.
  3. Type a custom media type such as theater/stage-play, cli/man-page, or recipe/steps. In permissive mode the Worker returns X-Media-Type-Mode: custom-synthesized with X-Cache-Risk: unbounded-custom-cardinality. Toggle Strict mode and the same request returns 406 Not Acceptable with Link alternates.
  4. Paste any public https:// URL, or use the one-click aifoc.us/hyper-content-negotiation button, to run the SSRF-guarded /transform proxy (HTTPS only, private and metadata addresses blocked on every redirect hop, 512 KiB cap, 5 s timeout) through streaming HTMLRewriter extraction.
  5. Open PageMorph at /app for the consumer version: paste any article URL or pick a featured essay, then tap Manga, Slide Deck, 2-Host Podcast, Flashcards, or Riso Zine. Each tile is the same URL with a different Accept header, rendered without the protocol tooling.
  6. Use Rewrite with live AI (Port Authority AI Router, Chrome built-in LanguageModel, or local Ollama) to rewrite panel dialogue, podcast turns, or a custom format in the browser, then compare latency and changed fields against the edge output, or Revert.
Sends experimental Accept media types such as comic/manga, deck/slides, audio/podcast, study/flashcards, visual/zine, and code/spec-tree to one canonical URL, compares deterministic edge compilation with optional in-browser AI rewriting, and measures where RFC 9110 syntax, IANA registration, and cache cardinality diverge. Open malleable accept studio: one url, a manga page, a podcast, or a zine full screen ↗ · Open PageMorph app (/app) ↗

Hypothesis

Any well-formed type/subtype can select a distinct, useful representation of one canonical URL without breaking HTTP semantics, as long as the server keeps a bounded registry for caching, reports registration status honestly, and refuses unknown types with 406 when strict.

What confirms it: All six faux types and arbitrary custom types return 200 from the same URL with Vary: Accept, Content-Location, and Link alternates; parameters change the output (reading=ltr flips panel order, panels=4 drops scenes, hosts=3 adds a voice); ?export=svg yields a valid image/svg+xml page; and ?strict=1 returns 406 for theater/stage-play while comic/manga still returns 200.

What bounds or disproves it: Failure modes: deterministic compilation that only reshuffles source sentences and reads as filler; custom types whose cache cardinality is unbounded under Vary: Accept; browsers and intermediaries that send their own Accept on navigation so the faux types only work from fetch() or curl; and live AI rewrites that add details not present in the source page.

Under the hood

Malleable Accept Studio (GitHub) is a Cloudflare Worker with three parts: src/negotiate.ts parses Accept per RFC 9110 (quoted parameters, q-values, specificity, token grammar), src/transforms.ts compiles a structured document into panels, slides, podcast turns, flashcards, zine pages, or a concept graph, and src/worker.ts emits the protocol headers.

Try it from a terminal:

curl -i https://malleable-accept-studio.kinlan-test.workers.dev/pages/hyper-content-negotiation \
  -H 'Accept: comic/manga; reading=ltr; panels=6'

curl -o manga.svg 'https://malleable-accept-studio.kinlan-test.workers.dev/pages/hyper-content-negotiation?export=svg' \
  -H 'Accept: comic/manga'

curl -i 'https://malleable-accept-studio.kinlan-test.workers.dev/pages/hyper-content-negotiation?strict=1' \
  -H 'Accept: theater/stage-play'

Every response echoes the negotiated type in Content-Type, sets Vary: Accept, Content-Location, and Link alternates for all representations, and reports X-IANA-Registered, X-Syntax-Valid-RFC9110, X-Cache-Risk, X-Source-Bytes, and X-Extraction-Parser. The comic panels are drawn by public/comic-art.js, a DOM-free scene graph that the browser converts with createElementNS and the Worker serializes for ?export=svg.

The edge compile never calls a model: it selects and rearranges sentences, quotes, lists, and code from the source. The optional live AI bar sends the rendered text fields and a source excerpt to a provider you choose (Port Authority AI Router, Chrome’s built-in LanguageModel, or local Ollama) so the two outputs can be compared side by side. The hyper content negotiation lab covers the registered-type version of the same idea.

PageMorph is the same Worker with the protocol tooling removed: paste a URL, tap a format tile, and each tile issues one fetch() with a different Accept header against the same canonical URL.

Key terms & further reading

RFC 9110 Accept ↗
The request header listing media ranges the client prefers, with parameters (; reading=rtl) and q-values from 0 to 1.
IANA Media Types Registry ↗
The official list of top-level types and subtypes. comic, deck, study, visual, and code are not registered top-level types.
RFC 6838 Media Type Registration ↗
Registration procedures for standards, vendor (vnd.), and personal trees, and the reason x- subtypes are discouraged.
406 Not Acceptable ↗
The status a server may return when it cannot serve any of the requested media ranges, used here as the strict-mode falsifier.
Vary Header ↗
Tells shared caches which request headers change the response; every distinct Accept value becomes a separate cache key.
Cloudflare HTMLRewriter ↗
A streaming HTML parser in Workers that extracts headings, paragraphs, quotes, lists, and code from remote pages.
Web Speech API ↗
Browser speech synthesis that plays the audio/podcast script with alternating voices, since the edge returns a script rather than audio bytes.

Open questions

  • Should modes of consumption (comic, deck, podcast) be expressed as media types at all, or as a separate preference header or client hint with an enumerated vocabulary?
  • What is the smallest registry of representation modes that covers most reading contexts while keeping Vary: Accept cache keys bounded?
  • How should a server label a model-generated representation so caches, crawlers, and readers can tell it apart from author-written content?

Iteration log

  • — Added PageMorph at /app on the same Worker: a consumer front end with featured essays, a URL box, five format tiles (manga with RTL/LTR and SVG export, slide deck, two-host podcast with Web Speech, flashcards, Riso zine), and an optional bring-your-own-model rewrite drawer. The studio and PageMorph share lib/comic-view.js, lib/live-ai.js, and renderers.js.
  • — Shipped the RFC 9110 negotiator with six faux types plus custom type/subtype synthesis and strict 406, the SSRF-guarded HTMLRewriter /transform proxy, a shared scene graph for the browser manga page and ?export=svg, slide/podcast/flashcard/zine/spec-tree renderers, a browser-side live AI rewrite bar, the wire inspector, and the IANA and RFC 9110 reality matrix.

Primitives tested: HTTP Accept Header, Media Type Parameters, Vary: Accept, HTTP 406 Not Acceptable, Content-Location, Link Headers, HTMLRewriter, SVG, Web Speech API, LanguageModel.

This is an active lab under /labs/ and stays off the main RSS feed until graduated into a full essay.

More in content negotiation, signed citations & attribution

Connected labs

← content negotiation, signed citations & attribution · All labs