Skip to content

Do not wait for network idle when in-flight requests will not be captured #399

@wwilsman

Description

@wwilsman

Previously, asset discovery would outright abort remote resource requests that would never be captured. This behavior was removed in #369 so we can capture the DOM of page while simultaneously discovering resources. We don't want to abort requests in this scenario so the page can be accurately rendered before serializing the DOM.

Another reason not to outright abort remote resources, would be in cases of "local" resources originating from remote resources. For example, say a page has a stylesheet at a cross-origin domain, however that stylesheet includes images or fonts that are present at the root domain. By aborting the cross-origin stylesheet that will not be captured, the same-origin images would never be requested. Think along the lines of a CDN that hosts custom stylesheets for a website.

These remote resources though can sometimes take a while to resolve. And when the resource will not be captured anyway, it blocks asset discovery from completing.

To speed up asset discovery when encountering resources that will not be captured, we should not track them at all. Similar to event stream requests, we can untrack resources that will never be captured. This is better than aborting them completely, and should have the same speed improvements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions