Open Bug 1855170 Opened 2 years ago Updated 1 year ago

rel=preload failures should not be retried

Categories

(Core :: DOM: Core & HTML, defect)

defect

Tracking

()

People

(Reporter: mbrodesser, Unassigned)

References

(Blocks 1 open bug)

Details

How is the desired behavior here for other resources, e.g. CSS files?

Summary: When an external `<script>` is unavailable, should it be requested again? → When an external resouce is unavailable, should it be requested again?

Do I understand this correctly: the problem is that if the dummy file doesn't exist, we first try to do a preload, then we try again when parsing the HTML file?
If the file exists we just load it the first time?

(In reply to Valentin Gosu [:valentin] (he/him) from comment #2)

Do I understand this correctly: the problem is that if the dummy file doesn't exist, we first try to do a preload,

Yes.

then we try again when parsing the HTML file?

Don't know when exactly. Only know that it's tried again.

If the file exists we just load it the first time?

It seems so. Although it could be that the load just happens later.

Flags: needinfo?(valentin.gosu)

I think this is a general rel=preload issue.
The problem is that once the preload fails, it usually gets removed from the preloads and then we do a second one. I think we do cache the 404 result if it has the appropriate headers, but normally we'd do a second request. 🤷
I don't think this is a necko bug.

This should really be fixed in the places that issue the preloads like here

Also, there is this note in the spec.
https://html.spec.whatwg.org/multipage/links.html#link-type-preload

It is important that network errors are added to the preload cache so that if a preload request results in an error, the erroneous response isn't re-requested from the network later. This also has security implications; consider the case where a developer specifies subresource integrity metadata on a preload request, but not the following resource request. If the preload request fails subresource integrity verification and is discarded, the resource request will fetch and consume a potentially-malicious response from the network without verifying its integrity. [SRI]

Blocks: rel=preload
Severity: -- → S3
Component: DOM: Networking → DOM: Core & HTML
Flags: needinfo?(valentin.gosu)
Priority: -- → P3
Summary: When an external resouce is unavailable, should it be requested again? → rel=preload failures should not be retried

Removing the severity and priority so that the responsible team may set them. Hope that's okay.

Severity: S3 → --
Priority: P3 → --
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.