Skip to content

Define behavior of preload when CSP was changed between fetching and consuming #7686

@noamr

Description

@noamr

Consider the following scenario:

  • A document with <link rel=preload as=image href="https://some-domain.com/image.png">

The document starts loading the image
Then a scripts adds CSP, before the image is discovered:
<meta http-equiv="Content-Security-Policy" content="default-src 'self'"> (or anything that doesn't allow the image)

And then an image
<img src="https://some-domain.com/image.png" />

Should the response that has already been loaded be consumed by the img element, or should CSP be applied again, denying the response from being used by the image element?
The current specs & WPT don't exactly cover this case. The way the spec is written, there is no additional CSP check upon consumption.

Metadata

Metadata

Assignees

No one assigned

    Labels

    integrationBetter coordination across standards needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions