---
title: h2.push
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/functions/tls-and-http/h2-push
---

```
VOID h2.push(STRING resource, STRING as?)
```

**Available in:** recv, hash, hit, miss, pass, fetch, deliver, error

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

```vcl
sub vcl_recv() {
  if (fastly_info.is_h2 && req.url == "/") {
    h2.push("/style.css");
    h2.push("/script.js");
    h2.push("img.jpg");
  }
}
```
