HTTP/2 Server Push

I want something like Cloudflare’s server push mechanism

Cloudflare supports HTTP/2 Server Push via the Link header. To make use of Server Push, most applications will need to change their code to include a Link header with any requests that have pushable assets.

For example, if you have a web page called page.html that requires /css/style.css, you need to add the following header to page.html:

Link: </css/style.css>; rel=preload;

This tells our edge network to begin pushing /css/style.css every time a visitor asks for page.html. If style.css is already in the local browser cache, the browser will ignore the push and cancel the download. Otherwise, when it discovers /css/style.css while rendering the HTML, the browser will use the pushed asset instead of going back to the server. This removes an unnecessary round-trip that would have occurred without Server Push.

Hi Alec,

Thanks for reaching out.

Render utilises Cloudflare and supports HTTP/2, so if you add the headers (whether manually, or through a package/library for your chosen language/framework) as shown in the article you shared, the assets should be pushed.

Hope that helps

Kind regards

Alan