Cloudflare has introduced a new performance feature: Speed Brain. This reduces page load latency by anticipating user behavior and prefetching content before it's needed.
This post explores the technology behind Speed Brain, its impact on web performance, and how you can use it on your website.
What is Speed Brain?
Speed Brain is Cloudflare's recent performance enhancement feature that uses predictive prefetching to help web pages load faster. It works by hinting to the browser that certain content should be downloaded in advance of a user navigating to a page. Here's how it works:
Understanding Speed Brain
1. Speculation Rules API
At its core, Speed Brain uses the Speculation Rules API. This API allows Cloudflare to provide instructions to browsers on when and what content to prefetch. Speculation Rules is supported in Chromium-based browsers, and will have no effect on unsupported browsers.
The previous video shows prerendering in action. Speed Brain currently only prefetches content, but future versions may include prerendering.
