I have a site behind Cloudflare with which I’d like to use HTTP/2 Server Push. The site has to do some slower processing before determining the HTTP status code and headers, so I’d like to push before the initial request’s response.
The timeline would look something like this:
- Client requests
- Server sends PUSH_PROMISES for
- Server sends HTTP headers and data for the assets above
- Server does some heavy processing to determine
- Server sends HTTP headers and data for
Is this possible with Cloudflare, or can I only use HTTP/2 Push via the
Link header? Based on my understanding of HTTP/2 Server Push without the Link header?, this does not seem possible with Cloudflare.
Could I use a Cloudflare Worker to preemptively initiate a Server Push? Even if this is possible, it feels wrong because my site is what knows which static assets should be Pushed. The Worker would need some way of figuring out which assets to push.