EtsyDavid WeinzimmerProblem & solution
Improving performance by prefetching product pages from Etsy Search
Summary
Etsy’s search and web performance teams tested the Speculation Rules API (SRA) to reduce loading time for product listing pages reached from desktop organic search. They added a speculationrules configuration that prefetches eligible listing HTML after a 200-millisecond hover, using URL and data-attribute selectors with moderate eagerness; unlike link prefetch, SRA uses both memory and HTTP caches. The experiment required attention to a two-page memory limit, five-minute retention, non-cacheable listing HTML, video hover behavior, cookies, new-tab targets, and analytics events triggered during prefetches. Results showed 23.6% faster 75th-percentile TTFB, with improvements of 20.7% in FCP, 21.1% in LCP, 20.4% in DOMContentLoaded, and 10.6% in Page Load, while roughly one in 14 prefetches led to navigation.
Context
Etsy wanted to improve the performance of product listing pages reached from search results. Listing HTML is non-cacheable, and prefetching introduces operational concerns involving memory eviction, cookies, redirects, browser tabs, video hover behavior, and analytics side effects.
Approach / What changed
The search team ran an A/B experiment on desktop Chromium browsers, adding a speculationrules script that matched eligible listing links and prefetching them after 200 milliseconds of hover with moderate eagerness. The teams also adapted caching and event logging behavior to limit the effects of speculative requests.
Takeaways
Speculative prefetching keeps pages in both memory and HTTP caches, whereas link prefetch uses only the HTTP cache; however, only two speculative prefetched pages remain in memory at once.
Etsy used the Sec-Purpose: prefetch header to identify speculative requests and make otherwise non-cacheable pages cacheable for five minutes, helping preserve prefetched HTML.
Prefetching can trigger cookies and analytics side effects; Etsy cached event payloads during prefetches and moved logging into the destination bundle after activation.
Source and freshness
- Source
- etsy.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.