Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf: add cache headers and explicit gzip/zstd encoding to Caddy

Static assets get 1h fresh + 24h stale-while-revalidate cache.
HTML always revalidates (no-cache). bios.mjs drops from 844KB to
195KB with gzip compression. Combined with Cloudflare edge caching,
repeat visits are near-instant.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+12
+12
lith/Caddyfile
··· 3 3 4 4 # --- papers.aesthetic.computer --- 5 5 :80 { 6 + # --- Global performance headers --- 7 + # Cache static assets (1h fresh, serve stale for 24h while revalidating) 8 + @cacheable path *.mjs *.js *.css *.woff2 *.woff *.ttf *.png *.jpg *.jpeg *.svg *.gif *.webp *.ico *.mp3 *.wav *.mp4 *.json 9 + header @cacheable Cache-Control "public, max-age=3600, stale-while-revalidate=86400" 10 + 11 + # HTML: no-cache (always revalidate, but use ETag for 304) 12 + @html path / *.html 13 + header @html Cache-Control "no-cache" 14 + 15 + # Encode everything (Caddy does this by default, but be explicit) 16 + encode zstd gzip 17 + 6 18 @papers host papers.aesthetic.computer papers.prompt.ac 7 19 handle @papers { 8 20 handle /en {