Replies: 2 comments
-
This feels like something that would be implemented metaframework-wise since that's where asset awareness is (like SolidStart). I actually mocked it up a couple of months ago because I heard of the Cloudflare support, but I couldn't find the "speed tab" they are referring to. I went ahead and tested a bunch of stuff but it never worked so I just left it alone. It's pretty easy to implement on top of Solid's In any case, excited this is coming to Chrome soon. |
Beta Was this translation helpful? Give feedback.
-
Nice. Can I help add it to SolidStart if what you did isn't already in working shape? As for where it is in the Cloudflare dashboard, you can see it by following this link then scrolling down to the Early Hints box to enable the beta for your account. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Idea
Hi all,
I've been doing a lot of thinking about streaming and performance, and I have some ideas about using streaming in potentially different ways using the HTTP
103 Early Hints
status code.A big reason to use streaming is to get content sent to the browser as soon as possible, usually before a page has finished fully rendering. And the biggest benefit is usually rendering the
<head>
as soon as possible so dependent resources are downloaded quickly. However, doing so comes by sacrificing the ability to determine a proper status code after building the page contents; rather, a200 OK
response must be returned while hoping that an error doesn't occur while streaming the response.A
200
+ HTTP response contains a 1:1 mapping of status code to response, whereas1xx
responses are "informational" meaning they are only a subset or for argument purposes a "chunk" of the full response; the103 Early Hints
response builds on top of the latter concept. If we look at the spec for 103 Early Hints, notice the output of the example response:Similar to a streaming response, each block of status code plus headers is delivered in "chunks" until the final
200
+ status code arrives which signifies the completion of the response. In the case where the primary use for streaming is to deliver assets from<head>
as soon as possible, adding support for103 Early Hints
will allow for all the current benefits of streaming rendering while allowing the application to decide as late as possible what response code to return.Server and Browser Support
Chrome is adding support for
103 Early Hints
in version 103 coincidentally enough, and Cloudflare is supporting it in beta now.Here are the bug reports tracking implementations in Chromium, Firefox, and WebKit:
Should We Support This?
I really think so. If the team agrees, I'd love for this to be my first contribution to the project. 👌
Beta Was this translation helpful? Give feedback.
All reactions