DZone
Performance Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Performance Zone > What Is HTTP 103?

What Is HTTP 103?

This article will dive into HTTP 103 status code with a quick demo.

NaveenKumar Namachivayam user avatar by
NaveenKumar Namachivayam
CORE ·
Jul. 09, 22 · Performance Zone · News
Like (7)
Save
Tweet
6.37K Views

Join the DZone community and get the full member experience.

Join For Free

Recently, Google Chrome 103 was released with a bunch of new features. One of the notable features is the introduction of HTTP Status Code 103. This article will dive into the HTTP 103 status code with a quick demo.

HTTP 103

From the Mozilla Developer Network Web Docs, HTTP 103 Early Hints is the information response status code primarily intended to be used with the Link header to allow the user agent to start preloading resources while the server is still preparing a response.

Here is the RFC link for more details.

HTTP 103 can be used to optimize the page speed by configuring HTTP header fields using link rel=preload.

How Does It Work?

Normally, when the browser sends a request, the server will receive it and process the request in less than a second and send an HTTP 200 OK response as shown below.

Using the HTTP 103 Early Hints, however, there is room to improve the page rendering speed.

Once the server is updated with the HTTP 103 feature, when a browser sends a request, if the server knows that the content needs resources like style.css, script.js, and so on, then it will hint (respond) with the HTTP 103 Early Hints response to the browser to preload the content as shown below.

Then, once the server processed the complete response, it will send normal HTTP 200 OK to the browser.

This process will help in the page rendering speed as the browser preloads the content ahead.

This feature requires updates to the server as I mentioned above. For Apache HTTP Server, please check here to configure.

Early Hints work only with HTTP/2 and HTTP/3.

It supports only 200, 301, and 304 response return codes.

Also, it works on the response link headers with preconnect or preload rel types.

Demo

To demonstrate HTTP 103 Early Hints, I deployed an EC2 instance on AWS with an Ubuntu image. I installed Apache HTTP Server with HTTP/2 and SSL.

Here is my conf file content.

H2Push on
H2EarlyHints on

Here is the curl output of the demo page:

Normal HTTP 200 OK
Normal HTTP 200 OK

Let us configure the H2PushResource in the conf file and reload the server.

H2Push on
H2EarlyHints on
<Location /index.html>
    H2PushResource /main.css
</Location>

Restart the apache server using sudo systemctl restart apache2 command.

Here is the curl output after enabling the HTTP 103 Early Hint feature.

HTTP 103 Early Hints
HTTP 103 Early Hints

As you see above, the first response from the server is HTTP/2 103 with the preloading main.css to the browser and then the server will respond with HTTP 200.

Here is the server response time section.

Server Response Time
Server Response Time

Final Thoughts

As you learned, HTTP 103 Early Hints help in optimizing the page rendering time by hinting at the browser to preload the resources. It also solved major issues of HTTP/2 server push as outlined here. Cloudflare is also working on making early hints smarter using machine learning. Let's keep our finger crossed.

AWS Apache HTTP Server Blog Google Chrome Machine dev Doc (computing) Google (verb) POST (HTTP) ubuntu

Published at DZone with permission of NaveenKumar Namachivayam, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • The 2-Minute Test for Kubernetes Pod Security
  • Optional in Java: When Better Code Is Not an Alternative
  • Auth0 (Okta) vs. Cognito
  • Sprint Goals: How to Write, Manage, and Achieve

Comments

Performance Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo