By subsetting a variable font with pyftsubset to include only the Unicode ranges and OpenType features your site actually needs, and serving it as a WOFF2 file with the CSS unicode-range descriptor, you can reduce web font payload by 70-85%. A typical setup drops a 300 KB variable font to under 40 KB while keeping full weight and italic axis support for every glyph you actually use. This post walks through the entire process from font selection to CI integration.
Web Dev
Modern web development from someone who builds it. CSS, JavaScript, web standards, and the patterns that actually scale.
Web Font Subsetting: Cut Payload by 90% with Variable Fonts
Real-Time Chat with WebSockets: Under 150 Lines, No Framework
A WebSocket chat needs two pieces. The server holds open connections and sends each message to every client. The browser client opens a socket, sends text on form submit, and shows new messages in the page. This build uses Node.js with the ws library and plain JavaScript on the client. No React, no Socket.IO, no build step. The whole thing fits in under 150 lines and handles dozens of users at once on a cheap server. This tutorial walks through every part.
Webhook Relay with Cloudflare Tunnels: Free ngrok Alternative
You can expose a local dev server to webhooks from GitHub, Stripe, or Twilio. Run cloudflared next to a FastAPI app. This drops port forwarding, public IPs, and paid ngrok plans. Cloudflare Tunnels open an outbound-only encrypted link from your machine to Cloudflare’s edge. The edge then proxies webhook requests back to your local FastAPI endpoint with full TLS, auto reconnect, and no firewall changes.
The trick works because cloudflared opens QUIC connections outward from your machine. No inbound ports ever open on your router. Cloudflare’s edge gets the webhook POST from GitHub or Stripe. It routes that POST through your tunnel and hands it to localhost:8000, where FastAPI handles it. You get a stable, public URL like webhooks.yourdomain.com that survives reboots.
Meilisearch + HTMX: Sub-50ms Search in 14 KB, No Framework
Pair Meilisearch
v1.12’s fast REST API with HTMX
2.0’s hx-get and hx-trigger attributes, and you get a real-time, typo-tolerant search box that returns results in under 50ms. You write no custom JavaScript and pull in no React or Vue. The server renders HTML fragments that HTMX swaps into the DOM, so the whole search box stays under 15 KB of total JS. This post covers the full setup, from Docker Compose to a working search UI with faceted filtering.
Service Worker Caching: Network-First, Cache-First, SWR
Service workers give you a programmable network proxy right inside the browser. They sit between your page and the server, intercept every fetch request, and let you decide whether to serve a response from cache or from the network. For static sites - where every page is a pre-built file and every asset has a predictable URL - this is a natural fit. A well-configured service worker makes your static site load in single-digit milliseconds on repeat visits, work fully offline, and pass every Lighthouse PWA audit. The entire implementation fits in a single JavaScript file under 100 lines.
Generating SVG Graphics with AI
For precise technical diagrams, prompt an LLM to output SVG or Mermaid.js syntax instead of pixel-based images. This creates lightweight, resolution-independent graphics that search engines can read. Vector formats offer performance and clarity that raster images simply can’t match.
Why SVG? The Case Against Raster Images for Technical Diagrams
Most bloggers use screenshots or PNG exports for diagrams. This habit seems easy but carries hidden costs. A PNG flowchart often weighs 100 KB to 400 KB. In contrast, the same SVG diagram usually stays between 5 KB and 20 KB. This huge difference improves Core Web Vitals metrics like Largest Contentful Paint. Better performance helps your search rankings.
Botmonster Tech




