Use custom request blocking
  • 14 May 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Use custom request blocking

  • Dark
    Light
  • PDF

Article summary

When a website loads, it sends requests to a number of different domains. Some requests are associated with loading page content, but others, like requests that serve ads, have nothing to do with the data you want to collect. The Request Blocker allows you to speed up agent processing and efficiency by blocking domain requests unrelated to page content.

Apply request blocking

In the Agent Builder:

  1. Select File > Settings.
  2. Select Request Blocking.
  3. Select the level of request blocking you would like to use:
    • Level 1 - Standard to block ads and analytics.
    • Level 2 - Third-party to block any URLs that do not match the starting.
    • Level 3 - Event-Driven to block additional events once the document is ready for data scraping.
    • Level 4 - One Request to allow only one request, which is for the HTML document itself.
  4. SAVE.
    requestblocking.JPG

Additional request blocking

In addition to the levels of Request Blocking add Auto-blocking expressions to customize your own Request Blocking expressions.

In the Agent Builder:

  1. Select File > Windows.
  2. Select Navigation Requests.
  3. Select Request Blocking on the Navigation Requests window.
  4. In the Request Blocking Expressions dialog, add, clear, or write your own expression to block or use one of Mozenda's pre-made expressions:
    • JavaScript
    • CSS
    • Images
    • Media
    • Font
  5. Select SAVE.

Turn off Request Blocking:

In the Agent Builder:

  1. Select File > Settings.
  2. Deselect Request Blocking.
  3. Select SAVE.

Turn off Auto-Request Blocking:

In the Agent Builder:

  1. Select File > Windows.
  2. Select Navigation Requests.
  3. Select Clear Auto-Block.
  4. Select SAVE.

Was this article helpful?