<100ms E-commerce: Instant loads with Speculation Rules API
Blog post from Sentry
The Speculation Rules API (SRA) is a tool available in Chromium browsers that enhances the perceived performance of e-commerce websites by allowing them to prerender or prefetch critical pages, such as product details, cart, and checkout pages. The API works by hinting to the browser which pages a user is likely to visit next, enabling those pages to be preloaded or prerendered in advance, thus making navigation to these pages feel instantaneous. While prerendering fully loads and renders pages in the background for immediate access, prefetching only downloads the page's document, requiring further loading upon navigation. Although SRA significantly improves page load performance, it is not without challenges, such as increased server load, skewed analytics, and potential issues with stale authentication cookies. Non-Chromium browsers can still benefit from framework-specific prefetching features provided by tools like Next.js and Nuxt 3. By strategically implementing these optimizations and monitoring performance with tools like Sentry, website owners can enhance user experience and potentially increase conversions.