3 ms·
Does it server-push my Link preload header resources? (https://w3c.github.io/preload/#server-push-http-2 https://w3c.github.io/preload/#server-push-http-2)
by SimeVidas 9y ago
Does it server-push my Link preload header resources? (https://w3c.github.io/preload/#server-push-http-2 https://w3c.github.io/preload/#server-push-http-2)
- BillinghamJ 9y agoThat 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.