Available snapshots
A name resolves to the first entry carrying it, so
vsnap-base gives you the
256 MB one. To pin the other, pass its id. Both columns are accepted anywhere a
snapshot is named.
vsnap-base:latest is the default. Pass any other:
uv is preinstalled in every snapshot, so more Python packages can be added with
uv pip install --system <package>. In a browser that reaches PyPI because PyPI
sends CORS headers; apk add does not work there, because Alpine’s mirrors do not.Snapshot API
Where the cache lives
The firstSandbox.create() downloads a snapshot and keeps it: on disk in Node,
in origin-private storage in a browser. Later runs boot from the copy.
Snapshots are stored compressed, so a 256 MB snapshot occupies well under a
hundred megabytes. Still enough to be worth showing people.
clear() returns the number of bytes it freed and keeps suspended sandboxes,
which live alongside the snapshots. Pass { instances: true } to drop those too.
The next Sandbox.create() downloads again.
Storage in a browser
Origin-private storage is site data rather than the HTTP cache, so the browser’s “clear cached images and files” does not touch it. A browser is also free to evict it when the disk fills up, which costs a re-download and nothing else.Firefox prompts the user when you request persistence, so call it from something
they clicked rather than on page load.