HTTP/2 Server Push

Cloudflare released HTTP/2 support in December of 2015 for all customers. HTTP/2 is an update to the commonly used HTTP/1.1 protocol.

A powerful feature of HTTP/2 is Server Push, a way for web servers to send resources to the client (often times a browser) without waiting to parse the HTML for references to additional assets (images, stylesheets, JavaScript, etc.). This avoids the usual HTTP request/response cycle which happened for every script or stylesheet on a page.

Cloudflare supports HTTP/2 Server Push with the Link header field on all plan levels. Cloudflare will look for the Link header field, as outlined in RFC 5988, in response headers from the origin server and extract URI-references with parameters rel=preload. These URI will be pushed to the client.

Here is a sample Link header field to initiate Server Push:

Link: </images/image.png>; rel=preload;
Link: </css/main.css>; rel=preload;

HTTP/2 Server Push is not supported over SPDY connections, and is currently limited to 50 assets per page, 100 per connection.

Click here to learn more about Cloudflare's HTTP/2 and SPDY.

Still not finding what you need?

The CloudFlare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.

Powered by Zendesk