rahulramesha / http2-express-bridge

wrapper for express app to work with http2 protocol
MIT License
31 stars 6 forks source link

Maybe don’t advertise server push in the README, because it’s on its way out #2

Closed leafac closed 3 years ago

leafac commented 3 years ago

See https://groups.google.com/a/chromium.org/g/blink-dev/c/K3rYLvmQUBY/m/vOWBKZGoAQAJ?pli=1

rahulramesha commented 3 years ago

@leafac I am aware of this, it was disheartening when I read this during the development. I decided to implement the .push function after reading this.

First, one of the reasons mentioned is pushing is really rare in the wild, more motivation to use server push. Second, As far as I know, this is only on chrome and other browsers are not yet on board. The push method checks if the browser accepts push and then pushes. I Agree with some of the points in the intent to remove support, including that sometimes it can even reduce performance when not done right. But, If you make sure to not push the files that are cached in the browser and make sure to not push beyond the size the browser accepts, The performance improvement is substantial. It is hard to implement this, hence I have mentioned the use of https://www.npmjs.com/package/http2-express-autopush, Which follows the guidelines and have increased performance in the test applications I have used, refer https://medium.com/the-node-js-collection/node-js-can-http-2-push-b491894e1bb1

rahulramesha commented 3 years ago

Since this is not an issue with code, closing

leafac commented 3 years ago

Thank you for the information.