Artifact faa3c03678ff8d6a752a79d07d3a8ec2fa4e9888204c060893550eed48a0b21c:
- File
internal/web/stylesource_test.go
— part of check-in
[eb4793ee8e]
at
2026-08-31 15:49:44
on branch trunk
— serve the stylesheet instead of inlining it in every page
112,118 bytes of <style> rode on every response — 40% of a 309,584-byte timeline page, byte-identical each time and uncacheable because it had no URL, while the JS assets already carried Cache-Control. Now one hashed asset served immutable: a rule change mints a new URL, so a stale cache is impossible without anyone revalidating. (user: quarry, size: 376) [annotate] [blame] [check-ins using]
package web // styleSource is where CSS assertions look. The stylesheet used to be // inlined in baseHTML — 112,118 bytes on every response, 40% of a // timeline page, and uncacheable because it had no URL. It is served as // a hashed asset now, so a test asking whether a rule exists has to ask // the sheet, not the page that links it. var styleSource = baseHTML + sheet