{
  "target": "hyper-content-negotiation",
  "mode": "builtin",
  "canonicalUrl": "https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation",
  "endpointUrl": "https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation",
  "requestedAccept": "*/*",
  "negotiation": {
    "format": "html",
    "contentType": "text/html; charset=utf-8",
    "matchedRange": "*/*",
    "q": 1,
    "source": "default",
    "acceptable": true,
    "candidates": [
      {
        "format": "html",
        "mediaType": "text/html",
        "matchedRange": "*/*",
        "q": 1,
        "specificity": 1,
        "serverPriority": 1
      },
      {
        "format": "markdown",
        "mediaType": "text/markdown",
        "matchedRange": "*/*",
        "q": 1,
        "specificity": 1,
        "serverPriority": 3
      },
      {
        "format": "jsonld",
        "mediaType": "application/ld+json",
        "matchedRange": "*/*",
        "q": 1,
        "specificity": 1,
        "serverPriority": 6
      },
      {
        "format": "json",
        "mediaType": "application/json",
        "matchedRange": "*/*",
        "q": 1,
        "specificity": 1,
        "serverPriority": 7
      }
    ]
  },
  "cacheKeyAnalysis": {
    "coarseVaryHeader": "Accept",
    "coarseVariantCount": 4,
    "promptProvided": false,
    "promptBytes": 0,
    "estimatedEntropyBits": 0,
    "promptPolicy": "not-sent",
    "hypotheticalVaryHeader": "Accept",
    "verdict": "Coarse RFC 9110 Accept negotiation keeps shared CDN caches bounded to 4 canonical variants (html, markdown, jsonld, json)."
  },
  "doc": {
    "slug": "hyper-content-negotiation",
    "title": "Hyper Content Negotiation: One Canonical URL, Multiple Representations",
    "author": "Paul Kinlan",
    "published": "2026-10-14",
    "url": "https://aifoc.us/hyper-content-negotiation/",
    "summary": "HTTP Accept negotiation enables a single canonical URI to deliver styled HTML to browsers, compact Markdown to text-oriented readers, and typed JSON-LD graphs to structured consumers without duplicate endpoints.",
    "tags": [
      "http",
      "content-negotiation",
      "rfc-9110",
      "markdown",
      "json-ld",
      "hypermedia"
    ],
    "headingCount": 5,
    "sectionCount": 5,
    "linkCount": 5
  },
  "baseline": {
    "label": "Canonical HTML Representation",
    "byteLength": 17818,
    "gzipBytes": 3859,
    "estTokens": 4452,
    "truncated": false
  },
  "formats": {
    "html": {
      "format": "html",
      "contentType": "text/html; charset=utf-8",
      "byteLength": 17818,
      "gzipBytes": 3859,
      "estTokens": 4452,
      "savedBytes": 0,
      "savedPct": 0,
      "tokenSavedPct": 0,
      "headers": {
        "Content-Type": "text/html; charset=utf-8",
        "Vary": "Accept",
        "X-Negotiated-Format": "html",
        "X-Content-Bytes": "17818",
        "X-Est-Tokens": "4452",
        "Link": "<https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=markdown>; rel=\"alternate\"; type=\"text/markdown\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=jsonld>; rel=\"alternate\"; type=\"application/ld+json\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=json>; rel=\"alternate\"; type=\"application/json\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation>; rel=\"canonical\"",
        "Cache-Control": "public, max-age=60"
      },
      "body": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <title>Hyper Content Negotiation: One Canonical URL, Multiple Representations | Hyper Content Negotiation Lab</title>\n  <meta name=\"description\" content=\"HTTP Accept negotiation enables a single canonical URI to deliver styled HTML to browsers, compact Markdown to text-oriented readers, and typed JSON-LD graphs to structured consumers without duplicate endpoints.\">\n  <meta name=\"author\" content=\"Paul Kinlan\">\n  <meta property=\"article:published_time\" content=\"2026-10-14\">\n  <meta property=\"og:title\" content=\"Hyper Content Negotiation: One Canonical URL, Multiple Representations\">\n  <meta property=\"og:description\" content=\"HTTP Accept negotiation enables a single canonical URI to deliver styled HTML to browsers, compact Markdown to text-oriented readers, and typed JSON-LD graphs to structured consumers without duplicate endpoints.\">\n  <meta property=\"og:type\" content=\"article\">\n  <link rel=\"canonical\" href=\"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation\">\n  <link rel=\"alternate\" type=\"text/markdown\" href=\"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=markdown\" title=\"Markdown representation\">\n  <link rel=\"alternate\" type=\"application/ld+json\" href=\"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=jsonld\" title=\"JSON-LD Schema.org representation\">\n  <link rel=\"alternate\" type=\"application/json\" href=\"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=json\" title=\"JSON representation\">\n  <script type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"Article\",\"@id\":\"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation\",\"mainEntityOfPage\":{\"@type\":\"WebPage\",\"@id\":\"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation\"},\"url\":\"https://aifoc.us/hyper-content-negotiation/\",\"headline\":\"Hyper Content Negotiation: One Canonical URL, Multiple Representations\",\"name\":\"Hyper Content Negotiation: One Canonical URL, Multiple Representations\",\"description\":\"HTTP Accept negotiation enables a single canonical URI to deliver styled HTML to browsers, compact Markdown to text-oriented readers, and typed JSON-LD graphs to structured consumers without duplicate endpoints.\",\"datePublished\":\"2026-10-14\",\"author\":{\"@type\":\"Person\",\"name\":\"Paul Kinlan\"},\"keywords\":[\"http\",\"content-negotiation\",\"rfc-9110\",\"markdown\",\"json-ld\",\"hypermedia\"],\"articleSection\":[\"The Token Overhead of HTML Chrome\",\"RFC 9110 Accept Header Mechanics\",\"Vary: Accept and Shared Edge Caching\",\"Discoverability via Link Alternates\",\"Failure Modes in Naive Content Proxies\"],\"hasPart\":[{\"@type\":\"WebPageElement\",\"position\":1,\"name\":\"The Token Overhead of HTML Chrome\",\"text\":\"Web pages built for interactive visual layout carry substantial structural overhead: stylesheet declarations, inline SVG icons, navigation bars, ARIA landmarks, wrapper elements, and script tags.\\n\\nWhen an automated client fetches a styled HTML page directly into a bounded context window, 65% to 85% of the transferred bytes and tokens describe presentation chrome rather than document prose or reference links.\\n\\nStripping tags after fetching wastes both origin egress and client parser cycles, while fragile heuristics can drop headings, tables, or attribution metadata.\"},{\"@type\":\"WebPageElement\",\"position\":2,\"name\":\"RFC 9110 Accept Header Mechanics\",\"text\":\"RFC 9110 Section 12.5.1 defines proactive content negotiation via the Accept request header. Clients list acceptable media ranges accompanied by optional quality weights (q-values between 0.000 and 1.000).\\n\\nSpecificity governs tie-breaking before server preference: an exact media type such as text/markdown outranks a type wildcard such as text/*, which outranks */*. A q-value of 0 explicitly excludes a representation.\\n\\nBy evaluating Accept on the canonical resource URI /docs/:slug, one URL serves human browsers (text/html), text parsers (text/markdown), and linked-data pipelines (application/ld+json) without fragmenting URLs.\"},{\"@type\":\"WebPageElement\",\"position\":3,\"name\":\"Vary: Accept and Shared Edge Caching\",\"text\":\"A negotiated endpoint without a Vary: Accept response header causes cache poisoning across client classes: an edge cache storing text/markdown under the canonical key would serve Markdown bytes to the next browser request.\\n\\nEmitting Vary: Accept instructs intermediate CDNs and browser caches to partition cache entries by the negotiated Accept header value alongside the request URI.\"},{\"@type\":\"WebPageElement\",\"position\":4,\"name\":\"Discoverability via Link Alternates\",\"text\":\"Clients that cannot set custom Accept headers—such as browser address bars or static crawlers—rely on explicit hypermedia links. Responses include HTTP Link headers and HTML \\u003clink rel=\\\"alternate\\\"\\u003e elements pointing to ?format=markdown and ?format=jsonld.\\n\\nThis preserves one primary URI as the canonical identifier while exposing deterministic format overrides for inspection and debugging.\"},{\"@type\":\"WebPageElement\",\"position\":5,\"name\":\"Failure Modes in Naive Content Proxies\",\"text\":\"Edge transformers that fetch arbitrary remote URLs without validating target hostnames and resolved IP ranges introduce Server-Side Request Forgery (SSRF) exposure against loopback interfaces and cloud metadata endpoints.\\n\\nProduction edge negotiators enforce HTTPS-only transport, private CIDR rejection on every redirect hop, bounded read streams, and strict request timeouts.\"}],\"citation\":[{\"@type\":\"CreativeWork\",\"name\":\"Hyper Content Negotiation essay\",\"url\":\"https://aifoc.us/hyper-content-negotiation/\"},{\"@type\":\"CreativeWork\",\"name\":\"Hypermedia systems overview\",\"url\":\"https://aifoc.us/hypermedia/\"},{\"@type\":\"CreativeWork\",\"name\":\"A link is all you need\",\"url\":\"https://aifoc.us/a-link-is-all-you-need/\"},{\"@type\":\"CreativeWork\",\"name\":\"RFC 9110 Section 12.5.1 (Accept)\",\"url\":\"https://www.rfc-editor.org/rfc/rfc9110#section-12.5.1\"},{\"@type\":\"CreativeWork\",\"name\":\"Schema.org Article vocabulary\",\"url\":\"https://schema.org/Article\"}],\"articleBody\":\"The Token Overhead of HTML Chrome\\n\\nWeb pages built for interactive visual layout carry substantial structural overhead: stylesheet declarations, inline SVG icons, navigation bars, ARIA landmarks, wrapper elements, and script tags.\\n\\nWhen an automated client fetches a styled HTML page directly into a bounded context window, 65% to 85% of the transferred bytes and tokens describe presentation chrome rather than document prose or reference links.\\n\\nStripping tags after fetching wastes both origin egress and client parser cycles, while fragile heuristics can drop headings, tables, or attribution metadata.\\n\\nRFC 9110 Accept Header Mechanics\\n\\nRFC 9110 Section 12.5.1 defines proactive content negotiation via the Accept request header. Clients list acceptable media ranges accompanied by optional quality weights (q-values between 0.000 and 1.000).\\n\\nSpecificity governs tie-breaking before server preference: an exact media type such as text/markdown outranks a type wildcard such as text/*, which outranks */*. A q-value of 0 explicitly excludes a representation.\\n\\nBy evaluating Accept on the canonical resource URI /docs/:slug, one URL serves human browsers (text/html), text parsers (text/markdown), and linked-data pipelines (application/ld+json) without fragmenting URLs.\\n\\nVary: Accept and Shared Edge Caching\\n\\nA negotiated endpoint without a Vary: Accept response header causes cache poisoning across client classes: an edge cache storing text/markdown under the canonical key would serve Markdown bytes to the next browser request.\\n\\nEmitting Vary: Accept instructs intermediate CDNs and browser caches to partition cache entries by the negotiated Accept header value alongside the request URI.\\n\\nDiscoverability via Link Alternates\\n\\nClients that cannot set custom Accept headers—such as browser address bars or static crawlers—rely on explicit hypermedia links. Responses include HTTP Link headers and HTML \\u003clink rel=\\\"alternate\\\"\\u003e elements pointing to ?format=markdown and ?format=jsonld.\\n\\nThis preserves one primary URI as the canonical identifier while exposing deterministic format overrides for inspection and debugging.\\n\\nFailure Modes in Naive Content Proxies\\n\\nEdge transformers that fetch arbitrary remote URLs without validating target hostnames and resolved IP ranges introduce Server-Side Request Forgery (SSRF) exposure against loopback interfaces and cloud metadata endpoints.\\n\\nProduction edge negotiators enforce HTTPS-only transport, private CIDR rejection on every redirect hop, bounded read streams, and strict request timeouts.\"}</script>\n  <style>\n    :root { --paper: #f6f3ec; --surface: #ffffff; --hairline: #e4dfd3; --ink: #161614; --muted: #57534e; --accent: #1d4ed8; }\n    * { box-sizing: border-box; }\n    body { margin: 0; font-family: system-ui, -apple-system, sans-serif; background: var(--paper); color: var(--ink); line-height: 1.65; }\n    header { background: var(--surface); border-bottom: 1px solid var(--hairline); padding: 1rem 1.5rem; }\n    .topbar { max-width: 68rem; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }\n    nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; padding: 0; font-size: 0.875rem; }\n    nav a { color: var(--accent); text-decoration: none; font-weight: 500; }\n    nav a:hover { text-decoration: underline; }\n    .layout { max-width: 68rem; margin: 2rem auto; padding: 0 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 2rem; }\n    @media (max-width: 820px) { .layout { grid-template-columns: 1fr; } }\n    article { background: var(--surface); border: 1px solid var(--hairline); padding: 2rem; }\n    h1 { margin-top: 0; font-family: Georgia, serif; font-size: 2rem; line-height: 1.2; }\n    .meta { color: var(--muted); font-size: 0.9rem; border-bottom: 1px solid var(--hairline); padding-bottom: 1rem; margin-bottom: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }\n    .summary { background: #faf8f4; border-left: 3px solid var(--accent); padding: 0.875rem 1rem; margin-bottom: 1.5rem; }\n    h2, h3 { font-family: Georgia, serif; margin-top: 1.75rem; }\n    aside { display: flex; flex-direction: column; gap: 1rem; }\n    .panel { background: var(--surface); border: 1px solid var(--hairline); padding: 1rem 1.25rem; font-size: 0.9rem; }\n    .panel h2 { font-size: 0.95rem; margin: 0 0 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }\n    .panel ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; }\n    .tag-list { list-style: none; padding: 0 !important; display: flex !important; flex-wrap: wrap; gap: 0.4rem; }\n    .tag-item { border: 1px solid var(--hairline); background: #faf8f4; padding: 0.15rem 0.5rem; font-size: 0.8rem; font-family: ui-monospace, monospace; }\n    footer { max-width: 68rem; margin: 0 auto 3rem; padding: 0 1.5rem; color: var(--muted); font-size: 0.875rem; }\n  </style>\n</head>\n<body>\n  <header>\n    <div class=\"topbar\">\n      <div><strong>Hyper Content Negotiation Lab</strong> &middot; Canonical Resource</div>\n      <nav aria-label=\"Alternate representations\">\n        <ul>\n          <li><a href=\"/\">Workbench</a></li>\n          <li><a href=\"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=markdown\">View Markdown</a></li>\n          <li><a href=\"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=jsonld\">View JSON-LD</a></li>\n          <li><a href=\"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=json\">View JSON</a></li>\n          <li><a href=\"https://aifoc.us/hyper-content-negotiation/\">Origin Essay</a></li>\n        </ul>\n      </nav>\n    </div>\n  </header>\n  <div class=\"layout\">\n    <main id=\"main\">\n      <article>\n        <h1>Hyper Content Negotiation: One Canonical URL, Multiple Representations</h1>\n        <div class=\"meta\">\n          <span>Author: Paul Kinlan</span>\n          <span>Published: <time datetime=\"2026-10-14\">2026-10-14</time></span>\n          <span>Slug: <code>hyper-content-negotiation</code></span>\n        </div>\n        <p class=\"summary\">HTTP Accept negotiation enables a single canonical URI to deliver styled HTML to browsers, compact Markdown to text-oriented readers, and typed JSON-LD graphs to structured consumers without duplicate endpoints.</p>\n        \n        <section id=\"section-1\" aria-labelledby=\"heading-1\">\n          <h2 id=\"heading-1\">The Token Overhead of HTML Chrome</h2>\n          <p>Web pages built for interactive visual layout carry substantial structural overhead: stylesheet declarations, inline SVG icons, navigation bars, ARIA landmarks, wrapper elements, and script tags.</p>\n          <p>When an automated client fetches a styled HTML page directly into a bounded context window, 65% to 85% of the transferred bytes and tokens describe presentation chrome rather than document prose or reference links.</p>\n          <p>Stripping tags after fetching wastes both origin egress and client parser cycles, while fragile heuristics can drop headings, tables, or attribution metadata.</p>\n        </section>\n\n        <section id=\"section-2\" aria-labelledby=\"heading-2\">\n          <h2 id=\"heading-2\">RFC 9110 Accept Header Mechanics</h2>\n          <p>RFC 9110 Section 12.5.1 defines proactive content negotiation via the Accept request header. Clients list acceptable media ranges accompanied by optional quality weights (q-values between 0.000 and 1.000).</p>\n          <p>Specificity governs tie-breaking before server preference: an exact media type such as text/markdown outranks a type wildcard such as text/*, which outranks */*. A q-value of 0 explicitly excludes a representation.</p>\n          <p>By evaluating Accept on the canonical resource URI /docs/:slug, one URL serves human browsers (text/html), text parsers (text/markdown), and linked-data pipelines (application/ld+json) without fragmenting URLs.</p>\n        </section>\n\n        <section id=\"section-3\" aria-labelledby=\"heading-3\">\n          <h2 id=\"heading-3\">Vary: Accept and Shared Edge Caching</h2>\n          <p>A negotiated endpoint without a Vary: Accept response header causes cache poisoning across client classes: an edge cache storing text/markdown under the canonical key would serve Markdown bytes to the next browser request.</p>\n          <p>Emitting Vary: Accept instructs intermediate CDNs and browser caches to partition cache entries by the negotiated Accept header value alongside the request URI.</p>\n        </section>\n\n        <section id=\"section-4\" aria-labelledby=\"heading-4\">\n          <h2 id=\"heading-4\">Discoverability via Link Alternates</h2>\n          <p>Clients that cannot set custom Accept headers—such as browser address bars or static crawlers—rely on explicit hypermedia links. Responses include HTTP Link headers and HTML &lt;link rel=&quot;alternate&quot;&gt; elements pointing to ?format=markdown and ?format=jsonld.</p>\n          <p>This preserves one primary URI as the canonical identifier while exposing deterministic format overrides for inspection and debugging.</p>\n        </section>\n\n        <section id=\"section-5\" aria-labelledby=\"heading-5\">\n          <h2 id=\"heading-5\">Failure Modes in Naive Content Proxies</h2>\n          <p>Edge transformers that fetch arbitrary remote URLs without validating target hostnames and resolved IP ranges introduce Server-Side Request Forgery (SSRF) exposure against loopback interfaces and cloud metadata endpoints.</p>\n          <p>Production edge negotiators enforce HTTPS-only transport, private CIDR rejection on every redirect hop, bounded read streams, and strict request timeouts.</p>\n        </section>\n      </article>\n    </main>\n    <aside aria-label=\"Document navigation and references\">\n      <div class=\"panel\">\n        <h2>Outline</h2>\n        <ul><li><a href=\"#section-1\">The Token Overhead of HTML Chrome</a></li><li><a href=\"#section-2\">RFC 9110 Accept Header Mechanics</a></li><li><a href=\"#section-3\">Vary: Accept and Shared Edge Caching</a></li><li><a href=\"#section-4\">Discoverability via Link Alternates</a></li><li><a href=\"#section-5\">Failure Modes in Naive Content Proxies</a></li></ul>\n      </div>\n      <div class=\"panel\">\n        <h2>Tags</h2>\n        <ul class=\"tag-list\"><li class=\"tag-item\">http</li><li class=\"tag-item\">content-negotiation</li><li class=\"tag-item\">rfc-9110</li><li class=\"tag-item\">markdown</li><li class=\"tag-item\">json-ld</li><li class=\"tag-item\">hypermedia</li></ul>\n      </div>\n      <div class=\"panel\">\n        <h2>References</h2>\n        <ul><li><a href=\"https://aifoc.us/hyper-content-negotiation/\" rel=\"canonical\">Hyper Content Negotiation essay</a></li><li><a href=\"https://aifoc.us/hypermedia/\" rel=\"related\">Hypermedia systems overview</a></li><li><a href=\"https://aifoc.us/a-link-is-all-you-need/\" rel=\"related\">A link is all you need</a></li><li><a href=\"https://www.rfc-editor.org/rfc/rfc9110#section-12.5.1\" rel=\"spec\">RFC 9110 Section 12.5.1 (Accept)</a></li><li><a href=\"https://schema.org/Article\" rel=\"spec\">Schema.org Article vocabulary</a></li></ul>\n      </div>\n    </aside>\n  </div>\n  <footer>\n    Served via RFC 9110 content negotiation with <code>Vary: Accept</code>. Canonical URI: <code>https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation</code>\n  </footer>\n</body>\n</html>\n"
    },
    "markdown": {
      "format": "markdown",
      "contentType": "text/markdown; charset=utf-8",
      "byteLength": 3557,
      "gzipBytes": 1752,
      "estTokens": 889,
      "savedBytes": 14261,
      "savedPct": 80,
      "tokenSavedPct": 80,
      "headers": {
        "Content-Type": "text/markdown; charset=utf-8",
        "Vary": "Accept",
        "X-Negotiated-Format": "markdown",
        "X-Content-Bytes": "3557",
        "X-Est-Tokens": "889",
        "Link": "<https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=markdown>; rel=\"alternate\"; type=\"text/markdown\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=jsonld>; rel=\"alternate\"; type=\"application/ld+json\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=json>; rel=\"alternate\"; type=\"application/json\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation>; rel=\"canonical\""
      },
      "body": "---\ntitle: \"Hyper Content Negotiation: One Canonical URL, Multiple Representations\"\nauthor: \"Paul Kinlan\"\npublished: \"2026-10-14\"\nurl: \"https://aifoc.us/hyper-content-negotiation/\"\ntags: [\"http\", \"content-negotiation\", \"rfc-9110\", \"markdown\", \"json-ld\", \"hypermedia\"]\n---\n\n# Hyper Content Negotiation: One Canonical URL, Multiple Representations\n\n> HTTP Accept negotiation enables a single canonical URI to deliver styled HTML to browsers, compact Markdown to text-oriented readers, and typed JSON-LD graphs to structured consumers without duplicate endpoints.\n\n## The Token Overhead of HTML Chrome\n\nWeb pages built for interactive visual layout carry substantial structural overhead: stylesheet declarations, inline SVG icons, navigation bars, ARIA landmarks, wrapper elements, and script tags.\n\nWhen an automated client fetches a styled HTML page directly into a bounded context window, 65% to 85% of the transferred bytes and tokens describe presentation chrome rather than document prose or reference links.\n\nStripping tags after fetching wastes both origin egress and client parser cycles, while fragile heuristics can drop headings, tables, or attribution metadata.\n\n## RFC 9110 Accept Header Mechanics\n\nRFC 9110 Section 12.5.1 defines proactive content negotiation via the Accept request header. Clients list acceptable media ranges accompanied by optional quality weights (q-values between 0.000 and 1.000).\n\nSpecificity governs tie-breaking before server preference: an exact media type such as text/markdown outranks a type wildcard such as text/*, which outranks */*. A q-value of 0 explicitly excludes a representation.\n\nBy evaluating Accept on the canonical resource URI /docs/:slug, one URL serves human browsers (text/html), text parsers (text/markdown), and linked-data pipelines (application/ld+json) without fragmenting URLs.\n\n## Vary: Accept and Shared Edge Caching\n\nA negotiated endpoint without a Vary: Accept response header causes cache poisoning across client classes: an edge cache storing text/markdown under the canonical key would serve Markdown bytes to the next browser request.\n\nEmitting Vary: Accept instructs intermediate CDNs and browser caches to partition cache entries by the negotiated Accept header value alongside the request URI.\n\n## Discoverability via Link Alternates\n\nClients that cannot set custom Accept headers—such as browser address bars or static crawlers—rely on explicit hypermedia links. Responses include HTTP Link headers and HTML <link rel=\"alternate\"> elements pointing to ?format=markdown and ?format=jsonld.\n\nThis preserves one primary URI as the canonical identifier while exposing deterministic format overrides for inspection and debugging.\n\n## Failure Modes in Naive Content Proxies\n\nEdge transformers that fetch arbitrary remote URLs without validating target hostnames and resolved IP ranges introduce Server-Side Request Forgery (SSRF) exposure against loopback interfaces and cloud metadata endpoints.\n\nProduction edge negotiators enforce HTTPS-only transport, private CIDR rejection on every redirect hop, bounded read streams, and strict request timeouts.\n\n## References\n\n- [Hyper Content Negotiation essay](https://aifoc.us/hyper-content-negotiation/) (canonical)\n- [Hypermedia systems overview](https://aifoc.us/hypermedia/) (related)\n- [A link is all you need](https://aifoc.us/a-link-is-all-you-need/) (related)\n- [RFC 9110 Section 12.5.1 (Accept)](https://www.rfc-editor.org/rfc/rfc9110#section-12.5.1) (spec)\n- [Schema.org Article vocabulary](https://schema.org/Article) (spec)\n"
    },
    "jsonld": {
      "format": "jsonld",
      "contentType": "application/ld+json; charset=utf-8",
      "byteLength": 7675,
      "gzipBytes": 2056,
      "estTokens": 1917,
      "savedBytes": 10143,
      "savedPct": 56.9,
      "tokenSavedPct": 56.9,
      "headers": {
        "Content-Type": "application/ld+json; charset=utf-8",
        "Vary": "Accept",
        "X-Negotiated-Format": "jsonld",
        "X-Content-Bytes": "7675",
        "X-Est-Tokens": "1917",
        "Link": "<https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=markdown>; rel=\"alternate\"; type=\"text/markdown\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=jsonld>; rel=\"alternate\"; type=\"application/ld+json\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=json>; rel=\"alternate\"; type=\"application/json\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation>; rel=\"canonical\""
      },
      "body": "{\n  \"@context\": \"https://schema.org\",\n  \"@type\": \"Article\",\n  \"@id\": \"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation\",\n  \"mainEntityOfPage\": {\n    \"@type\": \"WebPage\",\n    \"@id\": \"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation\"\n  },\n  \"url\": \"https://aifoc.us/hyper-content-negotiation/\",\n  \"headline\": \"Hyper Content Negotiation: One Canonical URL, Multiple Representations\",\n  \"name\": \"Hyper Content Negotiation: One Canonical URL, Multiple Representations\",\n  \"description\": \"HTTP Accept negotiation enables a single canonical URI to deliver styled HTML to browsers, compact Markdown to text-oriented readers, and typed JSON-LD graphs to structured consumers without duplicate endpoints.\",\n  \"datePublished\": \"2026-10-14\",\n  \"author\": {\n    \"@type\": \"Person\",\n    \"name\": \"Paul Kinlan\"\n  },\n  \"keywords\": [\n    \"http\",\n    \"content-negotiation\",\n    \"rfc-9110\",\n    \"markdown\",\n    \"json-ld\",\n    \"hypermedia\"\n  ],\n  \"articleSection\": [\n    \"The Token Overhead of HTML Chrome\",\n    \"RFC 9110 Accept Header Mechanics\",\n    \"Vary: Accept and Shared Edge Caching\",\n    \"Discoverability via Link Alternates\",\n    \"Failure Modes in Naive Content Proxies\"\n  ],\n  \"hasPart\": [\n    {\n      \"@type\": \"WebPageElement\",\n      \"position\": 1,\n      \"name\": \"The Token Overhead of HTML Chrome\",\n      \"text\": \"Web pages built for interactive visual layout carry substantial structural overhead: stylesheet declarations, inline SVG icons, navigation bars, ARIA landmarks, wrapper elements, and script tags.\\n\\nWhen an automated client fetches a styled HTML page directly into a bounded context window, 65% to 85% of the transferred bytes and tokens describe presentation chrome rather than document prose or reference links.\\n\\nStripping tags after fetching wastes both origin egress and client parser cycles, while fragile heuristics can drop headings, tables, or attribution metadata.\"\n    },\n    {\n      \"@type\": \"WebPageElement\",\n      \"position\": 2,\n      \"name\": \"RFC 9110 Accept Header Mechanics\",\n      \"text\": \"RFC 9110 Section 12.5.1 defines proactive content negotiation via the Accept request header. Clients list acceptable media ranges accompanied by optional quality weights (q-values between 0.000 and 1.000).\\n\\nSpecificity governs tie-breaking before server preference: an exact media type such as text/markdown outranks a type wildcard such as text/*, which outranks */*. A q-value of 0 explicitly excludes a representation.\\n\\nBy evaluating Accept on the canonical resource URI /docs/:slug, one URL serves human browsers (text/html), text parsers (text/markdown), and linked-data pipelines (application/ld+json) without fragmenting URLs.\"\n    },\n    {\n      \"@type\": \"WebPageElement\",\n      \"position\": 3,\n      \"name\": \"Vary: Accept and Shared Edge Caching\",\n      \"text\": \"A negotiated endpoint without a Vary: Accept response header causes cache poisoning across client classes: an edge cache storing text/markdown under the canonical key would serve Markdown bytes to the next browser request.\\n\\nEmitting Vary: Accept instructs intermediate CDNs and browser caches to partition cache entries by the negotiated Accept header value alongside the request URI.\"\n    },\n    {\n      \"@type\": \"WebPageElement\",\n      \"position\": 4,\n      \"name\": \"Discoverability via Link Alternates\",\n      \"text\": \"Clients that cannot set custom Accept headers—such as browser address bars or static crawlers—rely on explicit hypermedia links. Responses include HTTP Link headers and HTML <link rel=\\\"alternate\\\"> elements pointing to ?format=markdown and ?format=jsonld.\\n\\nThis preserves one primary URI as the canonical identifier while exposing deterministic format overrides for inspection and debugging.\"\n    },\n    {\n      \"@type\": \"WebPageElement\",\n      \"position\": 5,\n      \"name\": \"Failure Modes in Naive Content Proxies\",\n      \"text\": \"Edge transformers that fetch arbitrary remote URLs without validating target hostnames and resolved IP ranges introduce Server-Side Request Forgery (SSRF) exposure against loopback interfaces and cloud metadata endpoints.\\n\\nProduction edge negotiators enforce HTTPS-only transport, private CIDR rejection on every redirect hop, bounded read streams, and strict request timeouts.\"\n    }\n  ],\n  \"citation\": [\n    {\n      \"@type\": \"CreativeWork\",\n      \"name\": \"Hyper Content Negotiation essay\",\n      \"url\": \"https://aifoc.us/hyper-content-negotiation/\"\n    },\n    {\n      \"@type\": \"CreativeWork\",\n      \"name\": \"Hypermedia systems overview\",\n      \"url\": \"https://aifoc.us/hypermedia/\"\n    },\n    {\n      \"@type\": \"CreativeWork\",\n      \"name\": \"A link is all you need\",\n      \"url\": \"https://aifoc.us/a-link-is-all-you-need/\"\n    },\n    {\n      \"@type\": \"CreativeWork\",\n      \"name\": \"RFC 9110 Section 12.5.1 (Accept)\",\n      \"url\": \"https://www.rfc-editor.org/rfc/rfc9110#section-12.5.1\"\n    },\n    {\n      \"@type\": \"CreativeWork\",\n      \"name\": \"Schema.org Article vocabulary\",\n      \"url\": \"https://schema.org/Article\"\n    }\n  ],\n  \"articleBody\": \"The Token Overhead of HTML Chrome\\n\\nWeb pages built for interactive visual layout carry substantial structural overhead: stylesheet declarations, inline SVG icons, navigation bars, ARIA landmarks, wrapper elements, and script tags.\\n\\nWhen an automated client fetches a styled HTML page directly into a bounded context window, 65% to 85% of the transferred bytes and tokens describe presentation chrome rather than document prose or reference links.\\n\\nStripping tags after fetching wastes both origin egress and client parser cycles, while fragile heuristics can drop headings, tables, or attribution metadata.\\n\\nRFC 9110 Accept Header Mechanics\\n\\nRFC 9110 Section 12.5.1 defines proactive content negotiation via the Accept request header. Clients list acceptable media ranges accompanied by optional quality weights (q-values between 0.000 and 1.000).\\n\\nSpecificity governs tie-breaking before server preference: an exact media type such as text/markdown outranks a type wildcard such as text/*, which outranks */*. A q-value of 0 explicitly excludes a representation.\\n\\nBy evaluating Accept on the canonical resource URI /docs/:slug, one URL serves human browsers (text/html), text parsers (text/markdown), and linked-data pipelines (application/ld+json) without fragmenting URLs.\\n\\nVary: Accept and Shared Edge Caching\\n\\nA negotiated endpoint without a Vary: Accept response header causes cache poisoning across client classes: an edge cache storing text/markdown under the canonical key would serve Markdown bytes to the next browser request.\\n\\nEmitting Vary: Accept instructs intermediate CDNs and browser caches to partition cache entries by the negotiated Accept header value alongside the request URI.\\n\\nDiscoverability via Link Alternates\\n\\nClients that cannot set custom Accept headers—such as browser address bars or static crawlers—rely on explicit hypermedia links. Responses include HTTP Link headers and HTML <link rel=\\\"alternate\\\"> elements pointing to ?format=markdown and ?format=jsonld.\\n\\nThis preserves one primary URI as the canonical identifier while exposing deterministic format overrides for inspection and debugging.\\n\\nFailure Modes in Naive Content Proxies\\n\\nEdge transformers that fetch arbitrary remote URLs without validating target hostnames and resolved IP ranges introduce Server-Side Request Forgery (SSRF) exposure against loopback interfaces and cloud metadata endpoints.\\n\\nProduction edge negotiators enforce HTTPS-only transport, private CIDR rejection on every redirect hop, bounded read streams, and strict request timeouts.\"\n}\n"
    },
    "json": {
      "format": "json",
      "contentType": "application/json; charset=utf-8",
      "byteLength": 4620,
      "gzipBytes": 1880,
      "estTokens": 1154,
      "savedBytes": 13198,
      "savedPct": 74.1,
      "tokenSavedPct": 74.1,
      "headers": {
        "Content-Type": "application/json; charset=utf-8",
        "Vary": "Accept",
        "X-Negotiated-Format": "json",
        "X-Content-Bytes": "4620",
        "X-Est-Tokens": "1154",
        "Link": "<https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=markdown>; rel=\"alternate\"; type=\"text/markdown\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=jsonld>; rel=\"alternate\"; type=\"application/ld+json\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation?format=json>; rel=\"alternate\"; type=\"application/json\", <https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation>; rel=\"canonical\""
      },
      "body": "{\n  \"slug\": \"hyper-content-negotiation\",\n  \"title\": \"Hyper Content Negotiation: One Canonical URL, Multiple Representations\",\n  \"author\": \"Paul Kinlan\",\n  \"published\": \"2026-10-14\",\n  \"url\": \"https://aifoc.us/hyper-content-negotiation/\",\n  \"summary\": \"HTTP Accept negotiation enables a single canonical URI to deliver styled HTML to browsers, compact Markdown to text-oriented readers, and typed JSON-LD graphs to structured consumers without duplicate endpoints.\",\n  \"tags\": [\n    \"http\",\n    \"content-negotiation\",\n    \"rfc-9110\",\n    \"markdown\",\n    \"json-ld\",\n    \"hypermedia\"\n  ],\n  \"headings\": [\n    \"The Token Overhead of HTML Chrome\",\n    \"RFC 9110 Accept Header Mechanics\",\n    \"Vary: Accept and Shared Edge Caching\",\n    \"Discoverability via Link Alternates\",\n    \"Failure Modes in Naive Content Proxies\"\n  ],\n  \"sections\": [\n    {\n      \"heading\": \"The Token Overhead of HTML Chrome\",\n      \"level\": 2,\n      \"paragraphs\": [\n        \"Web pages built for interactive visual layout carry substantial structural overhead: stylesheet declarations, inline SVG icons, navigation bars, ARIA landmarks, wrapper elements, and script tags.\",\n        \"When an automated client fetches a styled HTML page directly into a bounded context window, 65% to 85% of the transferred bytes and tokens describe presentation chrome rather than document prose or reference links.\",\n        \"Stripping tags after fetching wastes both origin egress and client parser cycles, while fragile heuristics can drop headings, tables, or attribution metadata.\"\n      ]\n    },\n    {\n      \"heading\": \"RFC 9110 Accept Header Mechanics\",\n      \"level\": 2,\n      \"paragraphs\": [\n        \"RFC 9110 Section 12.5.1 defines proactive content negotiation via the Accept request header. Clients list acceptable media ranges accompanied by optional quality weights (q-values between 0.000 and 1.000).\",\n        \"Specificity governs tie-breaking before server preference: an exact media type such as text/markdown outranks a type wildcard such as text/*, which outranks */*. A q-value of 0 explicitly excludes a representation.\",\n        \"By evaluating Accept on the canonical resource URI /docs/:slug, one URL serves human browsers (text/html), text parsers (text/markdown), and linked-data pipelines (application/ld+json) without fragmenting URLs.\"\n      ]\n    },\n    {\n      \"heading\": \"Vary: Accept and Shared Edge Caching\",\n      \"level\": 2,\n      \"paragraphs\": [\n        \"A negotiated endpoint without a Vary: Accept response header causes cache poisoning across client classes: an edge cache storing text/markdown under the canonical key would serve Markdown bytes to the next browser request.\",\n        \"Emitting Vary: Accept instructs intermediate CDNs and browser caches to partition cache entries by the negotiated Accept header value alongside the request URI.\"\n      ]\n    },\n    {\n      \"heading\": \"Discoverability via Link Alternates\",\n      \"level\": 2,\n      \"paragraphs\": [\n        \"Clients that cannot set custom Accept headers—such as browser address bars or static crawlers—rely on explicit hypermedia links. Responses include HTTP Link headers and HTML <link rel=\\\"alternate\\\"> elements pointing to ?format=markdown and ?format=jsonld.\",\n        \"This preserves one primary URI as the canonical identifier while exposing deterministic format overrides for inspection and debugging.\"\n      ]\n    },\n    {\n      \"heading\": \"Failure Modes in Naive Content Proxies\",\n      \"level\": 2,\n      \"paragraphs\": [\n        \"Edge transformers that fetch arbitrary remote URLs without validating target hostnames and resolved IP ranges introduce Server-Side Request Forgery (SSRF) exposure against loopback interfaces and cloud metadata endpoints.\",\n        \"Production edge negotiators enforce HTTPS-only transport, private CIDR rejection on every redirect hop, bounded read streams, and strict request timeouts.\"\n      ]\n    }\n  ],\n  \"links\": [\n    {\n      \"label\": \"Hyper Content Negotiation essay\",\n      \"href\": \"https://aifoc.us/hyper-content-negotiation/\",\n      \"rel\": \"canonical\"\n    },\n    {\n      \"label\": \"Hypermedia systems overview\",\n      \"href\": \"https://aifoc.us/hypermedia/\",\n      \"rel\": \"related\"\n    },\n    {\n      \"label\": \"A link is all you need\",\n      \"href\": \"https://aifoc.us/a-link-is-all-you-need/\",\n      \"rel\": \"related\"\n    },\n    {\n      \"label\": \"RFC 9110 Section 12.5.1 (Accept)\",\n      \"href\": \"https://www.rfc-editor.org/rfc/rfc9110#section-12.5.1\",\n      \"rel\": \"spec\"\n    },\n    {\n      \"label\": \"Schema.org Article vocabulary\",\n      \"href\": \"https://schema.org/Article\",\n      \"rel\": \"spec\"\n    }\n  ]\n}\n"
    }
  },
  "curlExamples": {
    "markdown": "curl -i -H \"Accept: text/markdown\" \"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation\"",
    "jsonld": "curl -i -H \"Accept: application/ld+json\" \"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation\"",
    "json": "curl -i -H \"Accept: application/json\" \"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation\"",
    "html": "curl -i -H \"Accept: text/html\" \"https://hyper-content-negotiation-lab.kinlan-test.workers.dev/docs/hyper-content-negotiation\""
  }
}
