Skip to content
Morlabs

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.

Subscribe
Chat with our AI AgentChat with our AI AgentChat with our AI AgentChat with our AI AgentChat with our AI AgentChat with our AI Agent