-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Add API for Emitting Informational Responses (1xx), for Example 103 Early Hints #27851
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
Comments
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
With Chrome 103, the Early Hints/HTTP 103 feature was launched: https://developer.chrome.com/blog/new-in-chrome-103/#http103. Initial performance benefits look quite good: https://blog.cloudflare.com/early-hints-performance/#performance-improvement-with-early-hints |
Firefox will be shipping early hints support in v120: https://groups.google.com/a/mozilla.org/g/dev-platform/c/RBv4SMie9gA/m/pRokpmIwAAAJ. Safari shipped early hints in v17: https://developer.apple.com/documentation/safari-release-notes/safari-17-release-notes So now all browsers have shipped or will ship this feature. |
Late to the party here but anyway... I needed support for It's currently hard coded to the 104 response but should be easily changed to support Just wanted to share in case someone has a need for it. |
I don't understand how is this marked with affecting-very-few? Can't speak for http push but 103 early hints is a major performance improvement. |
Any progress on this? |
@Tratcher could you please re-triage this? |
RFC 8297 is still experimental. It's unlikely to be implemented in the framework until the spec is finalized. |
The mainline browsers currently support it. Is it policy to implement everything when standards are finished? |
Yes, because it's hard to change the APIs later if the standard changes. You're welcome to submit an API proposal to at least get the process started. https://github.com/dotnet/aspnetcore/issues/new?assignees=&labels=api-suggestion&projects=&template=30_api_proposal.md&title= |
Hi @Tratcher, |
Not implementing this until the RFC is finalized is the correct call, even if the browsers support a version of it. |
You're talking about the potential long term use, not the current interest. Even if it was supported it would still be a manual process to use and I don't anticipate many people putting in that effort. It's also only an optimization, not new functionality. +Blocked due to RFC. |
Not sure if this is the right thing to do but I'm commenting to show that the "very few" cohort of people interested is growing. :-) |
In the meantime, the RFC has been changed from experimental to standard:
So, I think this is not a blocker anymore? |
Thanks for the starting point. I've created an extension method for the 103 Early Hints: For the HTTP/2 implementation I had to add I've tested the implementation in ASP.NET Core 2.3 (.NET FX), 8.0 and 9.0 in the browsers Firefox (works with HTTP/1 and HTTP/2) and in Chrome (HTTP/2 only): With $ nghttp https://192.168.178.103:7091/ -nv -H'user-agent: Chrome/134.0.0.0' -H'accept: text/html'
...
[ 1.448] recv (stream_id=13) :status: 103
[ 1.448] recv (stream_id=13) link: </js/form.min.js>; rel=preload; as=script, </bootstrap.min.css>; rel=preload; as=style, </js/choices.min.js>; rel=preload; as=script
[ 1.448] recv HEADERS frame <length=145, flags=0x04, stream_id=13>
; END_HEADERS
(padlen=0)
; First response header
[ 1.451] recv (stream_id=13) :status: 200
[ 1.451] recv (stream_id=13) content-type: text/html; charset=utf-8
... Where I call the extension, I also validate if the browser supports early hints and the accept-header includes |
Is your feature request related to a problem? Please describe.
Chrome developers have expressed intent to remove server push and at the same time pointed to 103 Early Hints as an alternative implementation suggestion. It would be nice to have this capability in ASP.NET Core.
Describe the solution you'd like
A generic approach to provide support for 103 Early Hints could be an API which allows emitting informational responses. Similar to current HTTP Trailers implementation, it could support only HTTP/2 as any modern HTTP/2 clients should ignore unsupported information response, while HTTP/1.x clients can misbehave.
Additional context
As @Tratcher pointed out there might be no way for this API to provide support in all hosting scenario as in case of IIS/Http.Sys it requires work in Http.Sys at the OS level.
The text was updated successfully, but these errors were encountered: