HTTP/2 Push

With HTTP/1, a web browser typically opens between four and eight connections and only accepts the responses in order, which can lead to blocking, congestion and retransmission. Typically web page resources come from more than one source leading to a new connection for each item and twenty or thirty connections overall. This adversely impacts the performance of other network applications.

However HTTP/2 uses just a single connection and accepts the responses in parallel. It uses header compression to reduce the overhead of the connection and a binary protocol for efficient parsing.

The HTTP/2 specification also includes a new Server Push capability. This allows a server to push responses proactively into client caches to speed up page loading times. It no longer has to wait for the web browser to parse the HTML before making a request for assets such as images, javascript and CSS.

The scope for pushed items is limited by various considerations. For example there needs to be a reliable pattern of associated requests. A CSS request that has always followed a particular page request is a strong candidate for server push, however navigation from page to page will not.

Section 4 of RFC7234 provides further information on age header fields and data freshness. When a response is fresh in the cache, it can be used to satisfy subsequent requests without contacting the server. If the server wants to force a cache to validate every request, it can assign an expiration time in the past to the age header and indicate the supplied response is already stale data.