Back to Blog
Founder's Notes

How We Designed the Fastest A/B Testing Snippet on the Internet

March 18, 2025
12 min read

Most A/B testing scripts are bloated. VWO's is ~100KB. Optimizely's is ~150KB. Ours is under 5KB — 20-30x smaller. Here's how we did it, and why it matters.

Script Size Comparison

Optimizely~150KB
VWO~100KB
Google Optimize (RIP)~50KB
ExperimentHQ<5KB

Why Script Size Matters

Load Time

Every KB adds milliseconds. A 100KB script takes 500ms+ on slow connections. Ours loads in ~20ms.

Core Web Vitals

Heavy scripts hurt LCP and FID. Google uses these for rankings. Lighter = better SEO.

Flicker Prevention

Faster scripts mean less time between page load and variant application. Less flicker.

How We Achieved Sub-5KB

1. No Framework Dependencies

Most tools bundle jQuery or other frameworks. We wrote everything in vanilla JavaScript. No dependencies, no bloat.

2. Feature Pruning

Enterprise tools include everything: heatmaps, recordings, personalization, analytics. We include only what's needed for A/B testing. Features that don't run in the snippet stay on the server.

3. Aggressive Minification

We use advanced minification: dead code elimination, property mangling, and tree shaking. Every byte is scrutinized.

4. Server-Side Intelligence

Complex logic runs on our servers, not in your browser. The snippet only handles assignment and DOM manipulation — the minimum required.

5. Lazy Loading

The visual editor and analytics dashboard load separately, only when needed. They never bloat the production snippet.

Real-World Performance

~20ms

Average load time

0

CWV impact

<50ms

Time to variant

The Tradeoffs We Made

To be transparent, here's what we chose not to include in the snippet:

No built-in heatmaps (use Hotjar if you need them)
No session recordings (use FullStory if you need them)
No personalization engine (focused on A/B testing)

We believe these are the right tradeoffs. Most teams don't need all-in-one suites — they need fast, focused tools that do one thing well.

The Philosophy

Speed is a feature. Every millisecond of load time affects user experience, conversion rates, and SEO. We obsess over performance because your visitors shouldn't pay the price for your testing tool.

The fastest code is code that doesn't exist. We removed everything that wasn't essential — and what's left is the fastest A/B testing snippet on the internet.

Share this article

Ready to start A/B testing?

Free forever plan available. No credit card required.