From 71d2fd5c3cd62f8876a97d9b5fd0c01bfbf1f00d Mon Sep 17 00:00:00 2001 From: Wesley Ray Date: Fri, 28 Aug 2026 21:49:10 -0400 Subject: [PATCH] Quote the compressed size again, now that the public path serves it The button briefly said 8.6MB. That was measured through Caddy, which is what garden.c0smere.net resolves to on the LAN -- split-horizon DNS, so every test from indoors had been hitting the internal proxy rather than the public one. A real visitor comes in through NPM on the VPS, and NPM now passes Accept-Encoding through for /cn/, so they get about 3.0MB. The LAN path is still uncompressed and that is fine: it is a LAN. Public is the number that belongs on a public page, and rawBytes stays in the manifest if that ever stops being true. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01S4wdbGSVzvUDHBWRjSVxfr --- src/pages/cannons.astro | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/pages/cannons.astro b/src/pages/cannons.astro index 7641d1c..418f3e8 100644 --- a/src/pages/cannons.astro +++ b/src/pages/cannons.astro @@ -12,15 +12,17 @@ const builtAt = build?.builtAt timeZone: 'America/New_York', }) : null; -// The RAW total, not the gzipped one, because that is what a visitor to -// garden.c0smere.net actually pays: NPM on the VPS blanks Accept-Encoding for -// every proxied request (its own nginx.conf:44), so cyrion's gzip_static is -// never asked and answers uncompressed. The .gz files exist and are correct; -// nothing public reaches them yet. Switch this to build.wireBytes -- about a -// third of the size -- once NPM passes the header through. Overstating the -// cost is the safe direction for a button whose whole job is to be honest -// about it. rawBytes is absent from exports made before this was noticed. -const overTheWire = build ? mb(build.rawBytes ?? build.wireBytes) : null; +// The gzipped total, which is what a public visitor pays: cyrion serves the +// .gz siblings via gzip_static, and NPM now asks for them (a `location ^~ +// /cn/` in that host's advanced config -- needed because NPM blanks +// Accept-Encoding globally AND its assets.conf caches *.js from a regex +// location with Vary stripped, which would pin one encoding for everyone). +// +// On the LAN it is still the raw figure: garden.c0smere.net resolves to Caddy +// indoors, not NPM, and Caddy hands back uncompressed. Public is the number +// that belongs on a public page, and rawBytes is in the manifest if that ever +// stops being true. +const overTheWire = build ? mb(build.wireBytes) : null; --- Play - downloads about {overTheWire} MB — {mb(build.bytes['classes.js'])} MB - of client, {mb(build.bytes['cannons.wasm'])} MB of server, and the - game's own art + downloads about {overTheWire} MB — the client, the server, and + the game's own art, compressed