Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Putting an upper limit on preload/prefetch chains #130

Closed
yoavweiss opened this issue Aug 29, 2018 · 4 comments
Closed

Putting an upper limit on preload/prefetch chains #130

yoavweiss opened this issue Aug 29, 2018 · 4 comments

Comments

@yoavweiss
Copy link
Contributor

Currently, since preloads and prefetches can be loaded using Link headers, it is possible to create a "preload chain" where each preloaded/prefetched resource is triggering another preload.

UAs are already able to terminate prefetch chains, as prefetch is speculative and the UA can simply not load it. They should be able to do the same for preload chains beyond a certain depth.

It's not clear to me if the depth should be well-specified, or if it can/should be UA-dependent.

@domfarolino
Copy link
Member

Do any UAs actually currently terminate prefetch chains? Of course the spec allows such behavior, but just curious if you've observed a de facto limit imposed by a few impls or not. Since the spec says preloads are mandatory fetches, I lean towards a depth being specified in some manner, even if it's not a hard number or something. But giving UAs the ability to terminate preload chains without violating spec (given "mandatory") sounds like a good idea.

@yoavweiss yoavweiss added this to the Level 1 milestone Oct 21, 2018
@noamr
Copy link
Contributor

noamr commented Apr 11, 2022

We should address this once link headers become part of the HTML spec.

@noamr
Copy link
Contributor

noamr commented Apr 21, 2022

Since we're going to limit subresource link headers to only styles/scripts, maybe this is not necessary? The same way a style can import another css recursively to infinite depth, and the same goes for module imports, perhaps the UA doesn't need to be involved in this?

@yoavweiss
Copy link
Contributor Author

The limitations on link header preload would indeed most-probably resolve this. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants