How to support HTTP 103 Early Hints?
See original GitHub issuehi,
WIth Chrome 103, the HTTP 103 Early Hints
is in release build. But how to support this in expressjs? Thanks!!
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103 https://developer.chrome.com/blog/new-in-chrome-103/
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
103 Early Hints - HTTP - MDN Web Docs
The HTTP 103 Early Hints information response status code is primarily intended to be used with the Link header to allow the user...
Read more >103 Early Hints: What It Is and How to Implement It - NitroPack
103 Early Hints is the new HTTP status code that helps browsers decide what content to preload before the page has even started...
Read more >Beyond Server Push: The 103 Early Hints Status Code | Fastly
Sending 103 Early Hints allows the client to use the idle bandwidth to download those assets while the server is “thinking.” For example,...
Read more >103 Early hints - Web Core Vitals and Pagespeed consultancy
The 103 Early hints is a lightweight 'non-final' server header with the status code 103 and the name early hints. This header is...
Read more >Chromium Docs - 103 Early Hints
You can opt any page on your origin into Early Hints by requesting a token for your origin. Include the token in both...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No, it’s not a wrapper, it is inheritance. Anything on the Node.js response is on the Express.js response, because it’s just class inheritance. The Express.js response is just a subclass of the Node.js response. You’ll notice you can call
res.writeProcessing()
andres.writeContinue()
in your Express.js middleware, yet you won’t find those anywhere in the Express.js source code, since nothing needs to be done to add methods from the Node.js classes to the Express.js ones. I hope that helps.@dougwilson Thanks so much for the reply.
Everything (minus one part) you said makes sense and I agree with all of it.
This is the part I’m slightly confused about. I was under the impression that Express.js was basically a wrapper around the Node.js HTTP package. Therefore, wouldn’t the wrapper need to be updated to support that new method?
Methods such as
res.set
don’t exist within the native HTTP package (I assume it gets mapped toresponse.setHeader
).So shouldn’t Express.js (at some point) add a new method for the
writeEarlyHints
method that was added in that PR? Similar to howres.set
maps toresponse.setHeader
. Something likeres.earlyHints
that gets mapped toresponse.writeEarlyHints
?