How To Setup Cloudflare Early Hints

how to setup Cloudflare early hints in WordPress

How To Setup Cloudflare Early Hints in your websites and apps that are currently using Cloudflare? Early Hints by Cloudflare is a Brand New addition to their speed optimizations where you can see an almost 30% speed boost in web content loading by using 103 response Code which is the new HTTP Status Code for Indicating Hints for preloading Webpage content before response code 200 that means a lot faster routing for the specific link –

What is the 103 Early Hints Code?

According to httpwg.org

The 103 (Early Hints) informational status code indicates to the client that the server is likely to send a final response with the header fields included in the informational response

Typically, a server will include the header fields sent in a 103 (Early Hints) response in the final response as well. However, there might be cases when this is not desirable, such as when the server learns that the header fields in the 103 (Early Hints) response are not correct before the final response is sent

Examples of 103 Early Hints

Client request:

  GET / HTTP/1.1
  Host: example.com

Server response

  HTTP/1.1 103 Early Hints
  Link: </style.css>; rel=preload; as=style
  Link: </script.js>; rel=preload; as=script

  HTTP/1.1 200 OK
  Date: Fri, 26 May 2017 10:02:11 GMT
  Content-Length: 1234
  Content-Type: text/html; charset=utf-8
  Link: </style.css>; rel=preload; as=style
  Link: </script.js>; rel=preload; as=script

How To Setup Cloudflare Early Hints

  1. Log in to your Cloudflare dashboard and select your domain
  2. From the dashboard, click Speed > Optimization.
  3. Under Optimized Delivery, click Join the beta.

After you sign up, you will be added to a list of beta users, and the feature will be enabled in batches from the list. After admission into the Beta, you can toggle Early Hints on or off from Optimized Delivery

Cloudflare early hints settings

How early hints works

Early Hints are only generated and cached:

  • For URIs with .html.htm, or .php file extensions, or no file extension
  • On 200, 301, or 302 response return codes
  • When the response contains link headers with preconnect or preload rel types

Cloudflare Early Hints Setup Video

Cloudflare early hints video guide

If you want to know the best optimized Cloudflare settings then see our article here

Comments

Leave a Reply