nginx HTTP/2 server push, and why it disappoints

HTTP/2 push lets the server send a resource before the browser asks, which sounds like it should remove a round trip and in practice often sends something the browser already has cached.

location = /index.html {
    http2_push /css/app.css;
    http2_push /js/app.js;
}

The server has no idea what is in the client cache, so a returning visitor is pushed two files they already hold and the bandwidth is wasted — measurably, on mobile. There is a cache-digest proposal to fix exactly this and it is not implemented anywhere. Preload hints are the boring alternative that works: the browser decides, and it knows what it has.