Skip Images and Fonts in Puppeteer to Speed Up Headless Loads
Reduce Puppeteer bandwidth and load time by aborting image, stylesheet, and font requests with request interception.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Reduce Puppeteer bandwidth and load time by aborting image, stylesheet, and font requests with request interception.
Puppeteer's request interception can block images, fonts, and trackers to cut bandwidth and runtime in scraping and CI — if you resolve every request and measure the actual savings.
Puppeteer request interception lets you block images, stylesheets, and fonts before they download. This blog shows a practical pattern for selective loading, with a script and verification steps for fidelity vs speed.
Flaky staging APIs make flaky UI tests. Puppeteer's request interception lets you mock, block, or fail HTTP traffic from inside your test process — no backend required.
Use Puppeteer's request interception to abort images, fonts, and trackers, cutting scrape time and bandwidth — with a worked example, mocking via request.respond(), and the failure modes to watch for.
Use Puppeteer’s request interception to replace real API calls with mock responses, making end‑to‑end tests stable and fast. The post walks through a concrete example, highlights trade‑offs, and offers best‑practice tips.
When request interception is enabled in Puppeteer via page.setRequestInterception(true) , each outgoing request is paused and must be resolved with request.continue() , request.abort() , or request.override() . The goal is to determine whether Puppeteer automatically follows HTTP redirects (e.g., 301/302 responses) under interception, or if developers must m
Goal: guarantee that every network request is intercepted after a page navigation, including when working with incognito contexts. Constraints: request interception must be enabled before any navigation; enabling it after a page has started loading can miss early requests. Incognito pages do not inherit the interception flag from their parent context, requir
Puppeteer request interception credential masking without exposing Authorization header The goal is to prevent an Authorization header from reaching a protected endpoint while keeping the header value inaccessible to the page’s JavaScript context during intercepted requests. When `page.setRequestInterception(true)` is enabled, the interception listener can r