Running A/B tests is hard.
We all know how important it is for our business–it helps us understand how users are interacting with our products in the real world.
However, a lot of the A/B testing solutions are done on the client side, which introduces layout shift as variants are dynamically injected after the initial page load. This negatively impacts your websites performance and creates a subpar user experience.
To get the best of both worlds, we built Edge Middleware: code that runs before serving requests from the edge cache. This enables developers to perform rewrites at the edge to show different variants of the same page to different users.
Today, we'll take a look at a real-world example of how we used Edge Middleware to A/B test our new Templates page.