Trending

World technology news

→
2016 HTTP/2 Push: Why cache-blind acceleration carried risk
Software Engineering · 2016
Software Engineering2016

2016 HTTP/2 Push: Why cache-blind acceleration carried risk

The history of HTTP/2 server push shows why acceleration claims need cache-aware tests and current browser support.

Archive retrospective · Topic year 2016

Developer's JournalPublished: Dec 3, 20266 min read
Reading progress0%
In this article
  1. The 2016 context and the source
  2. A hypothetical page load
  3. Bandwidth and scheduling
  4. The present-day support boundary
  5. A measurement plan and decision
  6. Separate a protocol experiment from a browser performance result
  7. Make a current migration decision with evidence and a rollback path

The 2016 context and the source

On December 4, 2016, Robin Marx, a researcher at Hasselt University in Belgium, examined the possible benefits and practical risks of HTTP/2 server push in Web Performance Calendar. The 2015 HTTP/2 specification, RFC 7540, allowed a server to propose certain responses before the client explicitly requested them. Marx’s performance analysis is a contemporary technical interpretation, not a measurement proving a speedup on every network. This article treats the feature as a historical case rather than a current deployment instruction.

A hypothetical page load

Consider a news page whose HTML points to a critical stylesheet. A server might attempt to send that stylesheet early, potentially reducing the delay before the browser discovers and requests it. If the client already has the file cached, however, sending it again can waste connection capacity. The server does not necessarily know the client’s exact cache contents. A lower count of visible requests is therefore not sufficient evidence that readers actually saw a faster page. The relevant outcome depends on the request, cache state and connection.

Service architectureConceptual sketch · summary of the article's technical flow

Bandwidth and scheduling

Marx also highlighted the amount of data a connection can carry early on and the ordering of competing resources. Sending a large image first may make a render-critical stylesheet share capacity with less urgent bytes. Data already waiting in buffers cannot always be reprioritized at every layer. Review when individual resources arrive and when meaningful content becomes usable, not only the aggregate byte count. Actual outcomes vary with network conditions, server implementation and browser behavior; no performance result has been measured for the hypothetical page here.

The present-day support boundary

In 2022 the Chrome team announced removal of HTTP/2 Server Push support, citing inconsistent practical benefits. That decision does not mean HTTP/2 as a whole was removed: multiplexing and other protocol features are separate matters. Before adopting an older optimization, check current documentation for the browsers, CDN and server in the deployment. Evaluate appropriate caching, earlier discovery of critical resources and selective preload independently. Preload can also compete for bandwidth, so it should be tested rather than assumed to help.

A measurement plan and decision

In a controlled lab, record cold-cache and warm-cache visits separately, using the same page, network profile and browser version for comparisons. Inspect the request timeline, transferred bytes and the moment meaningful content appears together. Check whether a stylesheet already present in cache is fetched again. Keep laboratory observations distinct from real-user measurements and document the sample and setup. The sources are Marx’s 2016 Belgian analysis, RFC 7540 and the Chrome team’s 2022 product announcement; the example is a proposed experiment, not a completed benchmark.

Separate a protocol experiment from a browser performance result

Opening a push stream answers only the first part of the performance question. Acceptance, an existing cached resource and competition with the main document are separate concerns. In our local Node.js experiment the HTTP/2 server offers /style.css when it receives the document request. The client records the document response and the pushed stream independently. The expected output is one document and one complete CSS body. A second connection sets enablePush:false. The server observes that push is not allowed and returns the document without creating the additional stream. Neither run measures a browser cache or demonstrates an LCP improvement. The Node client exposes protocol behavior without reproducing browser resource priorities. The report therefore records stream counts, content and the explicit client setting. A performance claim would require representative browsers and network conditions. Both connections and the local server are closed after the experiment. The tiny stylesheet keeps the example inspectable; it is not evidence of a bandwidth advantage.

import assert from 'node:assert/strict';
import http2 from 'node:http2';
async function pushCheck(enablePush){
 const server=http2.createServer();server.on('stream',stream=>{
  stream.respond({':status':200,'content-type':'text/html'});
  if(stream.pushAllowed)stream.pushStream({':path':'/style.css'},(error,push)=>{assert.ifError(error);push.respond({':status':200,'content-type':'text/css'});push.end('body{color:navy}',()=>stream.end('document'));});
  else stream.end('document');
 });
 await new Promise(resolve=>server.listen(0,'127.0.0.1',resolve));
 const client=http2.connect('http://127.0.0.1:'+server.address().port,{settings:{enablePush}}),pushes=[];
 client.on('stream',(stream,headers)=>{let text='';pushes.push(new Promise(resolve=>{stream.setEncoding('utf8');stream.on('data',chunk=>text+=chunk);stream.on('end',()=>resolve({path:headers[':path'],text}));}));});
 try{
  const request=client.request({':path':'/'});let text='';request.setEncoding('utf8');request.on('data',chunk=>text+=chunk);await new Promise((resolve,reject)=>{request.on('end',resolve);request.on('error',reject);request.end()});
  const pushed=await Promise.all(pushes);assert.equal(text,'document');assert.equal(pushed.length,enablePush?1:0);if(enablePush)assert.deepEqual(pushed,[{path:'/style.css',text:'body{color:navy}'}]);
  return {enablePush,document:text,pushes:pushed};
 }finally{client.close();await new Promise(resolve=>server.close(resolve))}
}

console.log(await pushCheck(true));
console.log(await pushCheck(false));

Make a current migration decision with evidence and a rollback path

The Chrome team's official announcement says Server Push was disabled by default in Chrome 106. A technique discussed in the 2016 period therefore cannot be copied into a current browser project merely because an old protocol document describes it. Check the target clients and the current server configuration. The historical year identifies the subject of this article, rather than promising that the technique remains a recommended deployment choice. Establish a correct baseline without push. Identify an actual resource discovery delay before evaluating preload or Early Hints. If HTML already exposes the resource early, another hint may be unnecessary. Track transferred bytes, duplicate downloads and user visible timing together. Sending a resource earlier is not itself a successful outcome, particularly when it competes with the document on a slow connection. A rollback should preserve page behavior and appearance. Test a small traffic group, record the device and network mix, and examine slow connections rather than reporting only an improved average. The local protocol example remains a narrow, reproducible check. Its output and runtime version are retained with the publication evidence; it does not substitute for a production performance experiment.

Original technical diagram · Yazılımcının Günlüğü
798 reads ✎ Write a comment

Reader discussion

Discussion prompt

How would you measure this development's real-world impact?

No comments yet. Be the first to contribute.

Write a comment

Comments are real visitor contributions. Repeated, link-heavy or abusive submissions may be limited.