-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.S-blockedStatus: marked as blocked ❌ on something else such as a PR or other implementation work.Status: marked as blocked ❌ on something else such as a PR or other implementation work.
Description
- I have looked for existing issues (including closed) about this
Feature Request
Motivation
https://developer.chrome.com/docs/web-platform/early-hints
Early Hints is a method for returning a list of resources to the client before actually sending back the actual response to their query.
This will help with performance on heavier SSR websites.
Proposal
enum EarlyHint {
Preconnect(String),
Script(String),
Style(String),
}
async fn send_early_hint(hints: Vec<EarlyHint>) {
// ... use tokio::spawn etc. to send off a HTTP 103 Early Hint Response
// While the body of the handler function (after this await)
// calls a billion databases to generate the HTML
}
// example
send_early_hint(vec![
EarlyHint::Style("/main.css".into()),
EarlyHint::Script("/main.js".into()),
EarlyHint::Preconnect("https://fonts.google.com".into()),
]).await;Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.S-blockedStatus: marked as blocked ❌ on something else such as a PR or other implementation work.Status: marked as blocked ❌ on something else such as a PR or other implementation work.