Use custom request blocking
  • 10 Apr 2020
  • 1 Minute To Read
  • Contributors
  • Print
  • Share
  • Dark

Use custom request blocking

  • Print
  • Share
  • Dark

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.

To access block undesired website requests:

  1. Open the Agent Builder.
  2. Select File > Settings.
  3. Select Request Blocking.
  4. 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.
  5. SAVE.

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

  1. In the agent builder, select File > Windows.
  2. Click Navigation Requests.
  3. Select Request Blocking on the far right corner of Navigation Requests.
  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. Click SAVE.

To turn off Request Blocking:

  1. Select File > Settings from File.
  2. Clear Request Blocking.
  3. Click SAVE.

To turn off Auto-Request Blocking:

  1. Select File > Windows.
  2. Click Navigation Requests.
  3. Clear Auto-Block on the far right corner of Navigation Requests window.
Was This Article Helpful?