Support for status code 103 "Early hints"

Wanted to get this on the Cloudflare team’s radar. This would be an incredibly powerful feature should it gain traction in user agents.

https://www.fastly.com/blog/beyond-server-push-experimenting-with-the-103-early-hints-status-code

Chrome and Fastly are currently running an experiment to validate a web performance tool — and we need your help!

Remember all of the hype around Server Push? Since HTTP/2 shipped, it’s become increasingly clear that while the performance problem that it was designed to address is important, Server Push was not the right approach. Instead, the Preload mechanism has become a widely-used replacement that delivers most of the benefits of Server Push without the risk or complexity.

However, there are still situations where Preload doesn’t deliver great performance. Andrew Betts, our principal developer advocate, talked about a potential improvement in a blog entry two years ago: the 103 Early Hints HTTP status code, proposed by Fastlyan Kazuho Oku. Unfortunately, that proposal stalled because no browsers implemented Early Hints, so they weren’t useful for most web traffic.

Since then, it’s become clear that preload hints are here to stay; the HTTP Archive’s 2019 Almanac reported that they’re used on 16% of web sites. At the same time, take-up of HTTP/2 Server Push is still around the 0.04% of connections that Chrome reported back in 2017, according to Firefox telemetry.

That makes 103 Early Hints a lot more interesting as a potential performance improvement. However, supporting it is a lot of work for browser vendors, so they want to gather data on how much it improves things before spending the time and engineering resources.

That’s where the experiment comes in.

2 Likes

It seems something has been moving… :wink:

4 Likes

Can you fill us in on what you’re referring to? We’re not all insiders here.

1 Like

I guess they are referring to this new beta: https://blog.cloudflare.com/early-hints/

3 Likes

Looks like my prayers are being answered. #1, #2.
Finally, things are starting to get better, as in the close future they finally replace Http2/Push with something coequal.

A little disappointed with the blog post, as it does not clearly state how to implement it. It actually just shows what the headers look as an output.

Examples like:

Apache:

(.htaccess)

<FilesMatch "index.html">
    Header add Link "</assets/app.min.css>; rel=preload; type=text/css; as=style"
</FilesMatch>

Nginx:

(nginx.conf)

location ~ /index.html {
    add_header Link "</assets/app.min.css>; rel=preload; type=text/css; as=style"
}

Or something like it, so developers know how to properly implement it to make it work with Cloudflare. But ATM, we just know Cloudflare supports it, and you need Chrome v94 to make it work. But we don’t know how to make our servers actually send the right headers, or if there is anything we must consider.

Examples would be awesome, thanks Cloudflare :slight_smile:

2 Likes

Thanks, I saw it on the blog yesterday too! (Wasn’t there yet when I asked here.)

Good news! :slightly_smiling_face:

1 Like