Skip to content

Render-blocking status of a CSS preload which is subsequently requested while in flight #420

@tunetheweb

Description

@tunetheweb

We had a Chromium bug raised: https://issues.chromium.org/issues/457303652

The scenario is this in the <head>:

<link rel="preload" as="style" href="css/styles.css">
<link rel="stylesheet" href="css/styles.css">

Currently in Chrome the preload is non-render blocking, it is then upgraded to the render-blocking loader internally but we report the initial non-blocking status in Resource Timing.

We have a change to set this to blocking when the blocking-status is seen before the fetch completes (i.e. to match Chrome's internal status).

The Fetch and HTML specs seem vague on this (which we should probably fix).

The other thing to note is that this will be somewhat racey. For example if the preload request finishes before the <link rel="stylesheet" ... > is seen then the request will be reported as non-blocking. But that seems correct to me (what's what was known at the time, and we don't want to delay emitting the Resource Timing entry), and the same would happen if a <link rel="stylesheet" ... > was added after page load.

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