Engineering · Mar 12, 2026 · 9 min read
Edge personalization without writing another Jamstack blog post
How we run real per-user personalization at the edge on Vercel, geographic, behavioural, and A/B, without a CDN cache flush.
Mushfique Raiyan
Lead Full Stack Engineer
Personalization at the CDN edge used to be exotic. It is now a few lines in a middleware file. The interesting question is no longer "can we" but "what happens to the cache."
The mental model: your edge function reads a cookie or a header, decides what variant to render, and rewrites to a path that includes the variant slug. The rewritten path is what the cache keys on. Same content, same URL, but cached per variant. No flush needed when content changes; the variants are addressed independently.
We use this for geographic personalization (currency, language, shipping copy), for soft A/B testing without an external SDK, and for logged-in vs anonymous home variants. The variant set has to be small, three to five, or you blow up your cache cardinality. But within that constraint, edge personalization is now a Tuesday-afternoon feature, not a quarter.
Like what you're reading?
Get one studio dispatch a month, no tracking pixels, unsubscribe in one click.
Related reading
Engineering · 8 min
The actual cost of choosing an ORM
We use raw SQL via the Supabase client. Here's why the ORM tax is real, and the four cases where Drizzle or Prisma still wins.
Engineering · 4 min
Why our blog ships from TypeScript and not a CMS
Yes, this blog. Why we keep posts in TypeScript, what it costs us, and what we'll switch to (and when).