Available inall subroutines.

Emit an HTTP 103 early hint informational response to help the client start making preparations for processing the final response.

early_hints takes as a parameter headers in a text format. This function is only effective for clients connecting using HTTP/2 or later.

Although the early_hints function can be invoked from any VCL subroutine, invoking it in methods later than hit/miss/pass may not provide the benefits of the informational response. For example, if you call early_hints in vcl_deliver the browser will receive the early hints response at the same time as the main response headers.


sub vcl_recv {
if (fastly_info.is_h2 || fastly_info.is_h3) {
early_hints("link: </hinted.js>; rel=preload", "link: </hinted.css>; rel=preload");