Open one URL in several real desktop browsers at once and compare how each engine renders it.
Every browser runs in its own Linux VM inside your tab: nothing to install, no server behind the page.
Open Side by Side · Use it · How it works · Build and deploy
- Open https://michidk.github.io/sidebyside/ on a desktop computer with 8 GiB of RAM or more.
- Type a URL and press Open. Firefox (Gecko), Chromium (Blink) and Epiphany (WebKit) each boot in their own pane and load it. The first visit takes 1 to 3 minutes while the browsers download; later visits reuse the cache.
- Compare the panes. Each pane is the real browser: click, scroll and type in it as usual.
Each pane's header has a Full screen button to enlarge the running browser without restarting it. Press Esc or the exit button to return. If full screen is unavailable, the pane fills the page instead. Open in a new tab starts a separate browser session with the current comparison URL and settings; it does not transfer the running browser's tabs or history.
The toolbar does the rest:
- Browsers adds Firefox ESR and NetSurf (its own engine) and sets the order of the panes.
- Mobile switches the browsers to a phone-sized window and, except NetSurf, a mobile user agent, without rebooting the VMs. Firefox and Chromium switch while they run; Epiphany restarts.
- Settings sets the memory per VM, shows each pane's CPU, memory and network use, picks the internet relay, enables saved browser sessions or native screen pixel density, and edits each browser's command-line flags.
- Console collects the web-console messages of Firefox, Firefox ESR and Chromium in one list.
- Reset forgets the saved VMs (see below) and boots every browser from scratch.
Open a new URL and the running browsers go there: Firefox and Chromium navigate, Epiphany and NetSurf restart, and no VM reboots. Changed settings, or Open on the same URL, start the VMs over.
The link keeps everything, so you can share a comparison:
?url=https://example.com/&browsers=netsurf,firefox&mobile=1.
- VM: unkernel, a Linux kernel compiled to WebAssembly
that runs aarch64 programs, one per browser in its own iframe (
vm.html). Each VM gets an even share of your CPU threads (at most 4, 2 in Firefox). - Browsers: the real nixpkgs builds, served to the guest at
/nix/storebysrc/vm/store.ts. Store paths download from cache.nixos.org (which allows cross-origin reads) only when the guest first reads a file in them, and each NAR is checked against the NarHash inpublic/closures/*.json.scripts/closures.tswrites those manifests at build time from narinfos whose signatures it checks against cache.nixos.org's key. - Cache: downloads go into the page's Cache Storage (
src/vm/fetch-nar.ts), shared by all the VMs: they have most libraries in common, so each is downloaded once, and a second visit downloads nothing it already has. - Flags: each browser starts with flags that turn off what testing a page doesn't need
(updates, telemetry, sync, safe browsing, extra processes). They're in
src/modules/browsers/browsers.tsand editable under Settings → Browser flags; edited flags are saved in the link. - Windows: wland composites the guest's Wayland windows in
the page, reading shared pixel buffers directly from VM memory. Its relay runs in the guest and
sends window and input messages over vsock. The page uses WebGL when wland detects a hardware
renderer, with Canvas 2D as the fallback for software renderers and unavailable WebGL.
Displays default to one pixel per CSS pixel to reduce guest rendering work. Enable Settings →
Match screen pixel density, or
&hidpi=1, for your screen's native density. This changes the device pixel ratio websites see, so enable it when comparing high-density layouts and assets. - Internet: browsers can't open raw sockets, so the guest's TCP goes over a WebSocket to a
public Wisp relay
(
wisp.mercurywork.shop,anura.pro). Those relays see which hosts the VMs connect to. Use your own with?wisp=wss://your-relay/. - Saved VMs: opt in with Settings → Save browser sessions, or
&sessions=1. Once a browser is up, its VM is saved (memory, processes, the open page) in the site's private storage, and the next visit resumes it instead of booting Linux and starting the browser again. A save is tied to the browser, its flags, the memory and CPU count, and the page's build; anything else boots fresh. It holds what the browser had in memory, such as the cookies of the page it showed; Reset deletes them. unkernel supports restoring host file systems in worker mode upstream, and the in-VM Wayland relay runs with--profile sessionso the browser keeps its window across the resume. This requires guest-side compositing and copied pixel data, and saving pauses the VM. It is off by default to keep live interaction responsive. Package downloads stay cached with either setting. - Loading and background work: engine packages prefetch during runtime loading and boot. NARs decode in workers using streaming WebAssembly, with JavaScript as a fallback. Offscreen panes stop requesting guest frames and resume when visible; all visible comparisons keep running. See loading measurements.
- Remote control: the page drives Chromium over the DevTools protocol and Firefox over
WebDriver BiDi, each listening on the guest's
127.0.0.1:9222and reached through unkernel'svm.connect()(src/vm/control.ts). Websites in Firefox seenavigator.webdriverastrue, and its address bar shows the remote-control stripes. - Isolation: the VMs need
SharedArrayBuffer, so the pages loadcoi-serviceworker, which adds COOP/COEP on hosts that can't send headers.
The public relays are shared and throttled, and websites see their IP address. Running the relay locally removes that detour, and websites see your own connection. The page has the same steps under Settings → "Faster: run the relay on your computer…".
- Install Node.js 18 or newer.
- Run
npx -p @mercuryworkshop/wisp-js wisp-js-serverand leave it running. It listens on127.0.0.1:5001only, and refuses connections to private and loopback addresses, so the VMs can't reach your home network through it. - In Settings, click "Use local relay" (or set the Wisp relay to
ws://127.0.0.1:5001/, or add&wisp=ws://127.0.0.1:5001/to the link), then press Open.
bun install
bun run closures # optional: re-resolve the browsers to the newest aarch64 builds
bun run closures netsurf # or only the browsers named
bun run dev # the page with hot reload (builds the VM frame first)
bun run build # dist/client/: the static site
bun run check # type-check
bun testServe dist/client/ from any static host (GitHub Pages, Cloudflare Pages, Netlify, python3 -m http.server -d dist/client). It must be HTTPS, or localhost, for the service worker. To serve it
from a subpath, build with BASE_PATH=/subpath/ bun run build.
Live at https://michidk.github.io/sidebyside/: .github/workflows/pages.yml deploys every push to
main.
The page is a TanStack Start app built as a static SPA (only its shell
is prerendered; no server code), with shadcn/ui components on
Base UI. Each browser pane is an iframe of the VM frame (vm.html), which is
plain TypeScript bundled by Bun: its main thread already runs the compositor.
| Path | What it does |
|---|---|
src/routes/index.tsx, src/routes/-components/ |
The page: URL, browser menu, settings, console, one pane per browser |
src/routes/-lib/, src/routes/-hooks/ |
The page's link state, settings checks, frame URLs, and frame messages |
src/components/ui/ |
shadcn components (meter.tsx is Base UI's Meter in the same style) |
src/modules/browsers/ |
Each browser: packages, launch command, flags, console format |
src/modules/vm-frame/messages.ts |
What the page and the VM frames say to each other |
src/vm/main.ts, src/vm/vm.html |
One VM: boots the kernel, mounts the store, starts the browser |
src/vm/store.ts, fetch-nar.ts, nar.ts |
/nix/store as a lazy filesystem: download queue, cache, decompression, checks |
src/vm/gui.ts, log-view.ts |
The Wayland relay and compositor; the boot log |
scripts/build-vm.ts |
Builds the VM frame into public/, versioned so browsers never mix builds |
scripts/closures.ts |
Resolves and verifies the browsers' closures at build time |
- First load takes 1 to 3 minutes and downloads about 800 MiB for the three default browsers. The VMs run emulated, so pages are slow, and Epiphany may show "Page Unresponsive" (click Wait).
- Saved VMs take about 0.3 to 0.7 GB of the site's storage per browser (Epiphany 333 MB, Chromium 513 MB, Firefox 697 MB). A resumed Chromium is up in about 20 s instead of about a minute.
- The tab needs about 2 GiB of memory per browser shown (6 GiB for the default three).
- Ladybird and Servo don't run in the VM yet: Ladybird's JavaScript engine reserves more address space than the guest has, and Servo loads pages but never draws them with software OpenGL.
- Guest browsers render in software. The host page can use hardware WebGL to present their pixels, but guest OpenGL/Vulkan forwarding is not configured. WebGL availability alone does not mean hardware acceleration: software implementations such as SwiftShader use Canvas 2D instead.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
