Under 12KB, forever: how the AskThis widget stays fast

Every share widget makes the same promise — “lightweight” — and most break it within a year. Features accrete, an A/B testing library sneaks in, someone adds a retargeting pixel, and the “lightweight” script is suddenly 200KB of other people’s priorities running on your page.
We think the only credible answer is a number. The AskThis widget ships under 12KB gzipped, and that budget is enforced in CI: if a change pushes the bundle over the line, the build fails. Not a warning — a failure. Speed is the product, so the widget has to exemplify it.
What fits in 12KB
Everything you actually see: the social buttons, the Ask-AI buttons, the ask-anything box, and the event beacon. That’s it. There is no framework inside the widget, no analytics SDK, and — by product rule — no ads, ever. Ads are the reason legacy share widgets got heavy and slow; refusing them is a performance decision as much as an ethical one.
How it loads
The snippet is a single async script served from a global edge network, so it downloads from a location near your visitor and never blocks your page’s rendering. The widget hydrates after your content paints, and heavier pieces — the on-page AI preview, platform icons beyond the fold — load lazily, only when they’re about to be used.
How it stays out of your way
The widget renders inside a Shadow DOM, which means its styles cannot leak into your page and your styles cannot break it. It also fails silently: if the script can’t load or something goes wrong, your page simply renders without it. A sharing tool should never be able to take your site down, and this one can’t.
What we measure
We treat the widget like a product with an SLO. Every release is checked against three numbers: bundle size (under 12KB gzipped), time to interactive impact on a median blog page (target: none measurable), and Core Web Vitals deltas on real installs. Those numbers go in the changelog, because a performance claim you can’t audit is just marketing.
The result is a widget you can add to a page you’ve spent months optimizing — and keep your Lighthouse score. If you want to verify that yourself, install it on a test page, run your favorite audit before and after, and diff the results. We’re confident in what you’ll find, and if you ever aren’t, tell us. The budget is the contract.