← Back to Network domain

Network.setBlockedURLs

Blocks URLs from loading.

Domain: Network experimental

Parameters

NameTypeDescription
urlPatterns (optional)arrayPatterns to match in the order in which they are given. These patterns also take precedence over any wildcard patterns defined in `urls`.
urls (optional)arrayURL patterns to block. Wildcards ('*') are allowed.

Example Request

{
  "id": 1,
  "method": "Network.setBlockedURLs"
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('Network.setBlockedURLs');
console.log(result);