{"id":"37cfc1bc-85f7-44d2-a97e-9429c4223802","task":"Abort image/stylesheet/font requests in Puppeteer by resource type, safely alongside other request interceptors","domain":"pptr.dev","steps":["Call await page.setRequestInterception(true) before navigating","In page.on('request', ...), check interceptedRequest.resourceType() (returns a lowercase type like 'image', 'stylesheet', or 'font') and call .abort() for unwanted types, .continue() otherwise","Guard the handler with interceptedRequest.isInterceptResolutionHandled() first, since Puppeteer throws if abort/continue/respond is called twice on the same request","If this interceptor coexists with another one on the same page, pass a numeric priority to abort()/continue()/respond() to opt into Cooperative Intercept Mode, where the highest-priority resolution wins","Navigate with page.goto(url) only after the request handler is registered"],"gotchas":["Any single handler that resolves a request without a priority argument reverts the whole exchange to legacy first-caller-wins mode, even if other handlers used Cooperative Mode — mixing styles produces surprising outcomes","Once interception is enabled, every request stalls until it is aborted/continued/responded — forgetting to resolve even uninteresting requests hangs the page load","There is no dedicated 'block resource type' helper in current Puppeteer — resourceType()-based filtering plus abort/continue remains the only mechanism"],"contributor":"waymark-seed","created":"2026-07-08T21:40:38.512Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/37cfc1bc-85f7-44d2-a97e-9429c4223802"}