---
title: "Improving performance by prefetching product pages from Etsy Search"
description: "Etsy used the Speculation Rules API to prefetch listing pages when a user hovers over a search result for 200ms (moderate eagerness)."
url: "https://swe.quest/articles/improving-performance-by-prefetching-product-pages-from-etsy-search-daf6b3dfae7d7bcb"
canonical: "https://www.etsy.com/codeascraft/search-prefetching-performance"
source: "Etsy Code as Craft"
published: "2025-10-29"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["web-performance","browsers","frontend","ecommerce"]
---

# Improving performance by prefetching product pages from Etsy Search

A post on [Etsy Code as Craft](https://swe.quest/sources/etsy.md), published 2025-10-29, 11 min read, Case study. Original: [https://www.etsy.com/codeascraft/search-prefetching-performance](https://www.etsy.com/codeascraft/search-prefetching-performance)

## Summary

Etsy used the Speculation Rules API to prefetch listing pages when a user hovers over a search result for 200ms (moderate eagerness). The A/B test cut p75 TTFB by 23.6% and FCP, LCP and DOMContentLoaded by about 20%, with roughly 40% of eligible browsers seeing near-zero TTFB at a 14:1 prefetch-to-navigation ratio. Several gotchas came up: only two speculative prefetches stay in memory, non-cacheable pages are kept for just five minutes, video shadow DOM swallows hover events, cookies get set during prefetch, and hrefs that mutate on hover break prefetching. Analytics needed rework, so event logging was deferred until page activation, using the Sec-Purpose header to detect prefetch requests.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Web performance](https://swe.quest/tags/web-performance.md) (Web & mobile)
- [Browsers](https://swe.quest/tags/browsers.md) (Web & mobile)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)

## Prerequisites

- HTTP caching headers ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))
- Core Web Vitals ([easy posts on Web performance](https://swe.quest/tags/web-performance.md?difficulty=easy))
- browser resource hints

## Keywords

Speculation Rules API, Sec-Purpose, link rel=prefetch, prerender-until-script, Chromium, Etsy

## Related posts

- [Giving V8 a Heads-Up: Faster JavaScript Startup with Explicit Compile Hints](https://swe.quest/articles/giving-v8-a-heads-up-faster-javascript-startup-with-explicit-compile-hints-dd239c9384ec103b.md): V8 · 2025-04-29 · Medium · 3 min read · Runtimes & VMs, Web performance, JavaScript, Browsers
  Chrome 136 ships Explicit Compile Hints, which let developers mark a JavaScript file for eager compilation by placing the magic comment \`//# allFunctionsCalledOnLoad\` at the top.
- [From latency to instant: Modernizing GitHub Issues navigation performance](https://swe.quest/articles/from-latency-to-instant-modernizing-github-issues-navigation-performance-d76fe4f2daa6064a.md): GitHub Engineering · 2026-05-14 · Medium · 13 min read · Web performance, Caching, Frontend, Local-first & sync, Browsers
  GitHub made Issues navigation feel instant by moving to a local-first, stale-while-revalidate model: render issue pages from client-side data first, then revalidate in the background.
- [Rendering huge pull requests in the GitHub Copilot app](https://swe.quest/articles/rendering-huge-pull-requests-in-the-github-copilot-app-dfdd1afcfdc347d9.md): GitHub Engineering · 2026-09-23 · Medium · 13 min read · Frontend, Web performance, Performance engineering, Testing, Observability
  The GitHub Copilot app's pull request view stays responsive on a 2,200-file, million-line diff with 400+ review comments by splitting document height into two geometries: exact, precomputed prefix-summed code rows and lazily measured dynamic blocks for comments, drafts and composers.
- [How Etsy gets its mobile apps ready for peak traffic](https://swe.quest/articles/how-etsy-gets-its-mobile-apps-ready-for-peak-traffic-583aefb86e543392.md): Sentry · 2026-09-30 · Medium · 10 min read · Mobile, Observability, Deployment, Incidents & postmortems, E-commerce
  Because mobile apps can't be reverted once a binary ships, Etsy treats holiday peak prep as an October decision about visibility, routing and mitigation rather than capacity.
- [Making fetch happen: Building a general-purpose query and render scheduler](https://swe.quest/articles/making-fetch-happen-building-a-general-purpose-query-and-render-scheduler-3be522c5ec84d80d.md): Datadog Engineering · 2023-04-17 · Medium · 10 min read · Web performance, Frontend, Browsers, JavaScript
  Datadog replaced a tangled ~20-parameter dashboard scheduler with separate, general-purpose query and render schedulers used by widgets across the product.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
