Block and redirect requests

Block and Redirect rules run in Chrome’s network stack. Unlike overrides, they apply to scripts, import(), CSS, images, frames and requests from workers, as well as fetch and XHR. They don’t change page navigations.

Block

A blocked request fails with net::ERR_BLOCKED_BY_CLIENT, as if an ad blocker stopped it. Use it to:

  • see how your app behaves when a service is down,
  • keep analytics and third-party widgets quiet while you develop.

Redirect

The browser loads another URL instead, keeping the method and request body.

  • Load your local build on a live site: pattern cdn.example.com/app.js, redirect to http://localhost:5173/app.js.
  • Replace a file with inline content: redirect to a data: URL, e.g. data:application/javascript,console.log("stub").
  • Targets can be http:, https: or data: URLs. The editor refuses a target that matches the rule’s own pattern, since it would loop.

Rules order still counts

The first matching rule wins, across all actions. An override rule listed above a block rule keeps handling the fetch and XHR calls it matches; other requests for that URL are still blocked.

Regex patterns

Network rules use Chrome’s RE2 regex engine: no lookarounds ((?=…)) or backreferences (\1). The editor checks this when you save; imported rules with such regexes are skipped.

Something unclear or missing? Tell me, and I'll fix the docs.