Early Hints speed up page load times by preloading assets before the main request is completed, making your websites and web apps faster. Learn more in Roman Arutyunyan’s blog post.
Has anyone successfully set early hints up? I have followed the info on the blog post, I have also scoured the web and AI but nothing seems to work.
Is there going to be a more detailed tutorial? I tried with a fastcgi site, also proxypass using PHP Openswoole as well as a node server.
I must be missing something obvious or not understanding the flow.
Please note that NGINX currently only supports proxying Early Hints from backend. Make sure your backend actually sends them.
Thank you!
So I finally got this working with nodejs. In nginx in the location block early_hints on; is the solution it seems and not the example in the nginx blog unless I am missing something else.
I will keep adapting my scripts until I get a better picture but for now curl output is correct:
- Request completely sent off
- TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
- TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/2 103
< link: </my.css>; rel=preload; as=style
<
< HTTP/2 200
< server: nginx/1.29.0
< date: Thu, 03 Jul 2025 18:40:44 GMT
< content-type: text/html
< vary: Accept-Encoding
also confirmed at https://code103.hotmann.de testing tool.