Skip to main content

EnqueueStrategy

Strategy for deciding which links should be followed and which ones should be ignored.

Index

Enumeration members

ALL

ALL: 'all'

Enqueues all links found, regardless of the domain they point to. This strategy is useful when you want to follow every link, including those that navigate to external websites.

SAME_DOMAIN

SAME_DOMAIN: 'same-domain'

Enqueues all links found that share the same domain name, including any possible subdomains. This strategy ensures that all links within the same top-level and base domain are included.

SAME_HOSTNAME

SAME_HOSTNAME: 'same-hostname'

Enqueues all links found for the exact same hostname. This is the default strategy, and it restricts the crawl to links that have the same hostname as the current page, excluding subdomains.

SAME_ORIGIN

SAME_ORIGIN: 'same-origin'

Enqueues all links found that share the same origin. The same origin refers to URLs that share the same protocol, domain, and port, ensuring a strict scope for the crawl.