Mozilla plans to integrate support for Early Hints in the Firefox web browser. The feature may improve the time it takes to load webpages by up to 30% according to early studies.
Cloudflare announced Early Hints back in 2021 as a novel way to speed up the loading of webpages. Then, in 2022, the company announced a collaboration with Google and Shopify to establish Early Hints.
Early Hints explained
Whenever a user instructs a browser to open a webpage, some time is spend waiting. Some of the wait time depends on the user’s Internet connection and the website’s servers.
When a browser connects to a site, it requires instructions to know what to render and which resources it needs to fetch. The server provides the instructions. Often, servers require a bit of time to generate the list that they need for their response to the browser.
Traditionally, during that time, browsers don’t do anything. This changes with the introduction of Early Hints. Think of the feature as a way for the server to tell the browser where to start right away.
Instead of waiting for the full list of instructions and resources, the feature gives the browser some instructions. The browser may then use the information to start processing data, even before all instructions are provided by the server.
Early Hints is a web standard that defines the HTTP status code 103. You can read the linked blog posts for additional technical details.
Web Browser Support
Google implemented Early Hints support in Chrome 103 and Apple introduced support in Safari 17. Chromium-based browsers should also support the feature by and large.
You can point your browser to this page to find out if it supports the feature.
Mozilla Firefox will soon support the new technology as well. Mozilla confirmed this on Bugzilla. There, Mozilla writes:
The early-hints-preconnect showed overall positive results and we would like to enable Early Hints preconnect in the next version. An experiment on Early Hint preload will follow.
It looks as if Firefox 120 will support Preconnect only and that the full feature, Preload, will be introduced at a later point in time.
Closing Words
The integration in Firefox ensures support for Early Hints in all major browsers. While it will take a bit of time before the full feature lands in Firefox, Firefox users may notice speed improvements in Firefox 120 already. Firefox 120 looks to be a big release, as it will also block cookie banners.
Using Firefox version 118.0.2 (64-bit) on Linux Both,
https://early-hints.fastlylabs.com/
and
https://early-hints.fastlylabs.com/test.png
…loaded the green check mark.
Not sure if this is useful or possibly a misunderstanding of how it is supposed to be verified, lol. Maybe someone will provide additional input.
A 30% gain? At this time a site, not cached, with a load time of under 2 seconds and a first paint under 1 second is maybe an average and IMO quite acceptable. Minus 30% would lead to a fraction of a second gain. All this brainstorming for a few milliseconds makes me wonder if there’s not some sort of technical hysteria driving research in speed improvement. Using a browser extension that limits connections to 3rd-party sites is far more pertinent in my view. Now, if we consider that browsers will increasingly connect to 3rd-party sites with the increased time this means then we may wonder if speed is not the medicine to lower the impact of these increasing connections.
Still an impressive gain, if it holds true in real-world benchmarks.
Completely off-topic, but I’m glad you’re publishing articles on a new website.
Thanks!