h2.push
Available inall subroutines.
Preemptively sends a response to the client for resource
. The push
will happen immediately when the function executes, regardless of
what happens with the request being processed.
The pushed resource
can be a relative or absolute path, but must
share the same host as the current request.
Clients can disable pushes via the SETTINGS
frame and a given resource will
only be pushed once per connection.
Example
sub vcl_recv() { if (fastly_info.is_h2 && req.url == "/") { h2.push("/style.css"); h2.push("/script.js"); h2.push("img.jpg"); }}