
Datasette Lite's service-worker rewrite: Signal
Datasette Lite now runs real Datasette URLs through a service worker. It is Signal for demos, not for anyone who needs persistence or threads.
Datasette Lite's service-worker rewrite is a Signal, with caveats. It serves real Datasette URLs from a Pyodide-backed Web Worker, so plugin JavaScript, forms and cookies now work. But state lives in memory and is lost on tab close, plugins cannot use threads, and no cold-start or performance figures are published.
The Weights Desk · 3 min read- Signal: the 2026 rewrite serves real URLs through a service worker, which fixes the 2022 version's broken plugin JavaScript and CSS.
- Noise: the 'almost indistinguishable from the real application' line is the author's own claim, and neither source publishes benchmarks or cold-start times.
- Cookies and data live in memory and vanish when the tab closes or reloads, so this is not a persistence layer.
- Plugins must not require threads or subprocesses, which rules out part of the plugin ecosystem.
- The ?ref= and ?sqlite= parameters make a version or commit reproducible from a link, which is useful for bug reports and teardowns.
Datasette Lite's rewrite is a real engineering step and a Signal for anyone who wants to demo or reproduce a data-tool bug without standing up a server. Simon Willison's 17 November 2026 post says it is now "almost indistinguishable" from server-side Datasette. That is the author's verdict, and the published material contains no benchmark to test it against.
What changed from the 2022 version
The 2022 version simulated requests inside a Pyodide Web Worker and injected HTML with innerHTML. Per the post, script tags inserted that way do not execute, and the worker could not load extra JavaScript or CSS files, so JavaScript-dependent features broke. The 2026 version registers a service worker, serves real URLs, and lets plugin JavaScript and CSS load normally. The post says it began as a May 2026 research spike.
How the architecture works
A service worker covering the lite.datasette.io domain intercepts requests under /app/<session>/ and relays them to a Web Worker that runs Datasette's ASGI app in Pyodide. The page shows Datasette in a full-window iframe, and each tab gets a random session ID. The extra hop exists because, per the post, Pyodide inside a service worker cannot hold state beyond roughly 30 seconds.
Reproducibility is the useful part
URL parameters pin the environment. According to the README, ?ref= selects a PyPI release, stable, or a branch, tag or commit of the Datasette repository, and ?sqlite= installs a specific SQLite build through a pysqlite3 wheel, with Pyodide's built-in 3.39.0 as the default. The post gives two figures for available wheels: 163 in prose and "over 100" in a list. A link can therefore carry a version, a dataset and a plugin set, which a reader can rerun and argue with.
The limits a production team should weigh
This is not a deployment target. The README states that cookies and data live in memory and are lost when the tab closes or reloads, that plugins must not require threads or subprocesses, and that service workers are required, with some private modes disabling them. Failures surface as 503 when the owning tab is gone, 504 after four minutes without an answer, 500 on a Pyodide failure and 409 after an incompatible update.
What is missing: numbers
Neither source gives a cold-start time, a download size or a query benchmark. The README says the browser must download and start a full Python interpreter, install datasette and its dependencies, then fetch the databases, on Python 3.14 from Pyodide 314.0.8. For a latency-budget reader, that is an unmeasured first-load cost. Until someone publishes figures, treat the speed of the experience as a claim, not a result.
Verdict
Signal for sharing read-only data explorations, reproducing version-specific bugs and teaching, because the link carries the whole environment. Noise for anything needing persistence, threaded plugins or a measured latency budget. Adopt it for demos, and measure cold start on your own data and browsers before putting it in front of users.
- What changed in the 2026 Datasette Lite?
- It now registers a service worker that intercepts requests under /app/<session>/ and relays them to a Web Worker running Datasette's ASGI app in Pyodide, so scripts, stylesheets and POST forms load as on a real server.
- Why is a Web Worker still needed?
- Per Simon Willison's post, Pyodide inside a service worker cannot keep state for more than about 30 seconds, depending on the browser, so the Python runtime stays in a Web Worker.
- Does the project publish performance numbers?
- No. Neither the post nor the README gives cold-start time, download size or benchmarks, so any speed claim is untested here.
- What are the main limits?
- Service workers are required, state is in memory only, plugins cannot need threads or subprocesses, and the requests can fail with 503, 504, 500 or 409 in specific tab states.
- Running the full server-side Datasette Python app in the browser with service workers and Pyodide — Simon Willison
- simonw/datasette-lite README — GitHub (simonw/datasette-lite)