GoogleChrome / GoogleChrome/lighthouse

Suggesting which sub-resources to consider for Early Hints

Open
#13,773 3 comments 2 reactions 1 assignee Claimed by @paulirish View on GitHub
P2
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 14h
Merged PRs (30d)
20

Description

**Feature request summary**
[Early Hints](https://datatracker.ietf.org/doc/html/rfc8297) is a preliminary HTTP status code to indicate to the client that the server is likely to send a final response with the header fields included in the informational response. This is particularly compelling * in combination with LINK REL PRELOAD or PRECONNECT HTTP headers as a way to get the client to proactively prefetch/preconnect critical resources/origins while the server is busy generating / retrieving the main response.

We did an experiment with external partners and saw some significant improvements to LCP. That said, the benefits is really a function of what the Early Hints are used for. For instance, fetching a low-priority async JS is probably not the best use of this API.

So, I was wondering if Lighthouse could play a role in:
- raising awareness of this feature when it launches
- suggests reasonable resources/origins to consider sending via Early Hints based on a dependency chain for LCP.

I can help with product related aspects if needed.

**What is the motivation or use case for changing this?**
While Early Hints is inherently designed to avoid H2 Push's overpushing flaw (i.e. pushing assets that the client already has), it still has some potential sharp edges (e.g. link rel preload/preconnect to non-critical resources/origins). Having lighthouse offer guidance would likely avoid sub-optimal usage or even downright perf-negative usage.

**How is this beneficial to Lighthouse?**
I believe that providing actionable insights with significant wins on LCP would be welcomed by lots of Lighthouse users.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.