Skip to content

Use HTTP2 server push to improve load times #6214

@nachoparker

Description

@nachoparker

Hi,

This is a paste of my suggestion in this comment as a separate request.

To complement my message on the other post I would like to suggest that some sort of HTTP2 server push is implemented on the server side.

This will allow HTTP2 enabled servers to push assets to the browser even before it fully computes index.php and requests them. Note that assets can be preloaded or prefetched, and we can even preconnect to the server to save TCP connection time.

Also, it should be quite simple to implement. In the case of the NextCloudPi web interface (quite a simple example), it amounts to one line

header("Link: </minified.js>; rel=preload; as=script;,</ncp.js>; rel=preload; as=script;,</ncp.css>; rel=preload; as=style;,</ncp-logo.png>; rel=preload; as=image;, </loading-small.gif>; rel=preload; as=image;, rel=preconnect href=ncp-launcher.php;");

, and the result on a very slow QEMU ARM instance ( gray ball means pushed )

web-push

There's some informative links at the bottom of the blog post.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions