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

103 Early Hints #4

Open
Dreamsorcerer opened this issue Nov 23, 2023 · 2 comments
Open

103 Early Hints #4

Dreamsorcerer opened this issue Nov 23, 2023 · 2 comments

Comments

@Dreamsorcerer
Copy link

An idea for a future optimisation would be to use the 103 Early Hints response:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103

Basically, when the page can't be cached, it should try caching the resources linked in the page, in order to send in a 103 response for future requests. It could also try to predict the resources for new requests, e.g. if a resource is sent in all requests or all requests for a common URL prefix.

@oschaaf
Copy link
Member

oschaaf commented Nov 23, 2023

Interesting. This does remind me of this design doc which I think was implemented at to trigger dns prefetching (via the insert_dns_prefetch filter).

@Dreamsorcerer
Copy link
Author

Yes, this is basically one stage after that. Cloudflare say they are using machine learning to guess what resources would be needed. It sounds like they only pick out links which are already labelled as prefetch/preload in the origin document, so we could do better here if that design were also implemented.

This can still provide a decent boost without machine learning though, if it's too complex to do.

https://blog.cloudflare.com/early-hints/

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

No branches or pull requests

2 participants