Agent Wranglers

Performance Optional

Send early hints only when they help

Send 103 Early Hints (a note sent before the answer) only for critical, safe files. Check that first paint gets faster.

How to do it

Send 103 with Link: rel=preload for critical files that don't depend on screen size. Chrome acts on it only over HTTP/2 or HTTP/3. nginx passes it on only from 1.29, with early_hints. Measure it, because hinting fonts can delay first paint.

Example

:status: 103
link: </rest.5d2e9b.css>; rel=preload; as=style

:status: 200
content-type: text/html; charset=utf-8

How to check

curl -v shows the 103. A lab run shows first paint earlier with the hint than without it. If it does not, remove the hint.

Measured

On a reference site (earlier lab), Early Hints could only carry fonts, which delayed paint. A hint for a responsive image couldn't be sent, because the server API rejected the spaces in imagesrcset.

For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/performance/early-hints.