October 29, 2025
Static heat, dynamic tea
Hosting SQLite Databases on GitHub Pages (2021)
No server, real database: readers split between “wow” and “why now”
TLDR: A 2021 project runs a real database from a plain website using in-browser tech, no server needed. Commenters split between praising the idea, slamming the broken demo, and pushing newer options like DuckDB and ClickHouse, turning a clever hack into a showdown over what “modern” should look like.
A 2021 trick is back on the timeline: a developer ran a full SQLite database straight from a static website (think a plain webpage, no server), using WebAssembly to make the database engine run in your browser and smart “partial loading” so you don’t download the whole thing at once. It’s clever, it’s nerdy—and the crowd had thoughts.
The hype squad cheered the audacity, but the first bucket of cold water arrived fast: one reader hit the demo and got nothing but errors. Cue the irony police: the post says static sites “just work,” while the comments groaned about [error: NetworkError...]. Meanwhile, the upgrade brigade rolled in asking if the author would “just use DuckDB” now—an in-browser database darling in 2025. And the one‑up champs flexed harder: someone pointed out you can host massive ClickHouse tables on GitHub Pages too, dropping a link to the demo like a mic on stage.
There’s also meta-drama: timestamp cops yelled “this is from 2021,” and IPFS (a peer‑to‑peer file system) got name‑checked for the purists. In short: a cool no‑server database hack, half the crowd demanding newer toys, and half stuck refreshing a broken demo. The only thing loading faster than the data? The hot takes.
Key Points
- •A method is demonstrated to run a full, read-only SQLite database in the browser on static hosting using WebAssembly.
- •The approach uses sql.js with a custom virtual filesystem (sql.js-httpvfs) to stream database pages via HTTP Range requests.
- •A large demo dataset (WDI: 6 tables, 8M+ rows, ~670 MiB) is queried while fetching only kilobytes per query.
- •SQLite’s page-based storage and B-Tree indexes enable efficient partial reads; the demo uses a 1 KiB page size.
- •The system supports SQLite JSON functions and custom JavaScript functions within SQL queries, suitable for static-hosted analytics.