A Layered Approach to Speculation Rules – Harry Roberts – Web Performance Consultant
December 3, 2024
I don’t want to go super in-depth about the Speculation Rules API in this post, but the key thing to know is that it provides two speculative loading types—prefetch and prerender—which ultimately have the following goals:
- prefetch pays the next page’s TTFB costs up-front and ahead of time;
- prerender pays the next page’s TTFB, FCP, and LCP up-front.
It’s going to be very helpful to keep those two truisms in mind—prefetch for paying down TTFB; prerender for LCP. This makes prefetch the lighter of the two and prerender the more resource-intensive.
Source: A Layered Approach to Speculation Rules – Harry Roberts – Web Performance Consultant
A practical look at speculation rules by one of the world pre-eminent web performance experts.