How to run A/B tests with Next.js and Vercel
Sep 9, 2022

Summary
This post details the implementation of A/B testing for Vercel's Templates page using Next.js Edge Middleware. It explains how Edge Middleware can be used to perform rewrites at the edge to serve different variants of a page to different users, thereby avoiding client-side layout shifts. The post also covers the use of catch-all routes and on-demand revalidation for dynamic page generation and how to conditionally render skeleton loaders to further improve user experience during data fetching.