-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Process Preload link headers #7622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, yet again you tackle some major tech debt and give us hope for the future :). /cc @annevk as some of the header parsing stuff is making me feel out of my depth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very glad you found that RFC parser!
I'm excited to see this to be defined! One question from the POV of Early Hints: I guess we may not be able to create a document when we process link headers in Early Hints since we wouldn't know the content type of the final response. How should we handle the case? Here are options I came up with: (1) Delay processing link headers until we can create a document, (2) define the process link headers algorithm without the document parameter, replacing the parameter with some other parameters which can be obtained from both early hints responses and the final response, or navigationParams. I think (1) wouldn't be a viable option since it effectively makes Early Hints preloads no sense. OTHO I'm not sure (2) can be realistic. There might be other options. |
I started prototyping something along the lines of (2), the idea is that navigation params would hold a map of preloaded resources that the document will use as the initial map once it's created. As you said, (1) is not an option because it beats the purpose of early hints being early... |
Fantastic, thank you for the update! |
Preload links based on link headers, some of them on document creation, and the rest (viewport-dependant ones) when response chunks start arriving. This can be used as an infra for early-hints and other link types. Conforms to the current common denominator of implementations. See whatwg#4224
Preload links based on link headers, some of them on document creation,
and the rest (viewport-dependant ones) when response chunks start arriving.
This can be used as an infra for early-hints and other link types.
Conforms to the current common denominator of implementations.
See #4224
Closes w3c/preload#148
(See WHATWG Working Mode: Changes for more details.)
/browsing-the-web.html ( diff )
/infrastructure.html ( diff )
/semantics.html ( diff )