4 ms·
That would typically be implemented by a proxy or service like Cloudflare. The server itself should not do this based on header contents - instead the applicati
by BillinghamJ 9y ago
That would typically be implemented by a proxy or service like Cloudflare. The server itself should not do this based on header contents - instead the application should use the push protocol directly: https://nodejs.org/api/http2.html#http2_http2stream_pushstream_headers_options_callback https://nodejs.org/api/http2.html#http2_http2stream_pushstre...
It wouldn't be appropriate for the http2 core module to do this implicitly, but I wouldn't be surprised if higher level server abstractions, such as Express, did implement such a feature (though imo it'd still be better to not use the Link header).
It's also likely to work a lot better for a caching proxy to perform this action rather than the source server - since it can cache the contents of the resources being pushed.