Embed weight
How much does it weigh?
We publish this because a performance claim nobody can check is marketing, not engineering.
18.4 KB
gzipped ยท 57.4 KB raw
The 30 KB budget is self-imposed. If a release crosses it, the release does not ship until something comes out.
What is in it
In the bundle
Not in the bundle
Voice loads separately and only when used, so it never appears in this number.
Against other products
We have not measured anybody else. Rather than leave those cells out, we leave them in and mark them, so you can see exactly how much of this table is evidence and how much is not.
Scroll the table sideways to see every column.
Methodology
- What is measured
- The built runtime, gzipped at level 9 - the same compression the release gate uses. Not the source, and not the uncompressed file on disk.
- What is not counted
- Anything on your page. The figure is the bundle alone, and the voice runtime is a separate lazy-loaded chunk that never appears in it.
- By what
- scripts/check-embed-size.mjs, which runs on every build and fails it if the number crosses the budget. The figure on this page is read from the same artefact by the same method, so the two cannot disagree.
- What a browser actually downloads
- Less than this. Our host negotiates brotli when the browser accepts it, which is smaller again - we publish the gzip figure because it is the one the budget is written in and the one you can check.
Reproduce it yourself
Clone the repository and run the gate. It prints the same figure this page does, because it is the same code reading the same artefact.
pnpm --filter @leadgible/embed build
node scripts/check-embed-size.mjsOr measure what our host sends, without cloning anything:
curl -s -H "Accept-Encoding: gzip" -o /dev/null \
-w "%{size_download}\n" https://leadgible-staging-app.yhengdesigns.workers.dev/v1/embed.jsThat will not print exactly 18.4 KB, and the difference is the point of saying so: a CDN compresses with its own settings, so it lands within a rounding step either side. If yours differs by more than that, tell us and we will publish the correction rather than the average.