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