Skip to content
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

Experiment in adding support for Early Hints #1

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ryanwilsonperkin
Copy link
Owner

Prototyping potential approaches to the discussion in remix-run#5378 adding support for 103 Early Hints

Using this approach, we can make use of the writeEarlyHints functionality available in Node >=18.11 and can add support for other adapters.

❯ curl -is http://localhost:3000
HTTP/1.1 103 Early Hints
Link: </build/_assets/tailwind-VDK4BCBP.css>; rel=preload, </favicon.png>; rel=preload

HTTP/1.1 200 OK
X-Powered-By: Express
....

Conforms to the node adapter's specification for now because it's the
one that I'm most familiar with and will be trivially available in node
and express environments.

Will likely want to improve this interface to be more generic such that
each adapter can easily make use of it.
@ryanwilsonperkin ryanwilsonperkin changed the title Experiment in adding support for Experimental Hints Experiment in adding support for Early Hints Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant