Sintra service worker
Sintra — the web framework behind Blognami — now includes support for a service worker.
A service worker is like an HTTP proxy that runs inside your browser. It gives you powerful control over how requests are handled — right from the client side.
By default, Sintra takes a server-first approach to rendering, where HTML is generated on the server and sent to the browser to produce the DOM.
Most modern front-end frameworks (like React, Vue, or Angular) take the opposite approach — rendering everything in the browser by manipulating the DOM directly.
Sintra strikes a middle ground: it lets you run a lightweight web server inside the browser using the service worker.
This means you can choose — on a per-route basis — whether to render on the client or the server. For example, Blognami uses this feature to render the preview pane in its markdown editor directly in the browser.
The best part? You can now build Single Page Apps (SPAs) with the same mental model you’d use for a traditional server-rendered app. No context switching, no extra complexity.
This new feature is available in version 0.35.0
.