A simpler way to prioritise HTTP responses
The old HTTP/2 dependency-tree priority scheme was complex and widely
unimplemented, so RFC 9218 replaced it with Extensible Priorities: two
structured-field parameters carried in a Priority header. This reference lists
the urgency levels, the incremental flag, their defaults, and how browser
fetchpriority hints map onto them.
How it works
The Priority header is an HTTP structured-field dictionary with two members:
u— urgency, an integer0–7.0is the most urgent; the default is3.i— incremental, a boolean.i(true) means the response can be rendered progressively and interleaved with others of equal urgency; the default is false.
Priority: u=1, i
A client may send Priority as a request header to ask for a priority; a server
may include it (or a priority parameter on a Link preload) to reprioritise.
On the connection, the server serves lower u values first, and within one
urgency it round-robins incremental responses while sending non-incremental ones
to completion first.
Tips and mapping
- Browser
fetchpriority="high"roughly maps tou=1/u=2;lowtou=5/u=6. - Critical CSS and the LCP image deserve a low
u; analytics and prefetch belong high. - Mark streamed HTML and progressive images
iso they render as bytes arrive. - Omitting the header is the same as
u=3with no incremental delivery.