Skip to content

Commit

Permalink
readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulramesha committed Mar 2, 2021
1 parent 31f8302 commit 48b69c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,6 @@ server.listen(3000, () => {
```
As seen in the example above, server push can be used. It is built on the belief that server push is a luxury not a necessity. Hence, if the browser does not accept push, or there is an error in the path, It will not crash the application but only throw an error.

On the topic of server push, lots of guidelines have to be followed to have actual performance gains. See [Rules of Thumb for HTTP/2 Push](https://docs.google.com/document/d/1K0NykTXBbbbTlv60t5MyJvXjqKGsCVNYHyLEXIxYMv0/edit?usp=sharing) for the details.
On the topic of server push, lots of guidelines have to be followed to have actual performance gains. See [Rules of Thumb for HTTP/2 Push](https://docs.google.com/document/d/1K0NykTXBbbbTlv60t5MyJvXjqKGsCVNYHyLEXIxYMv0/edit?usp=sharing) for the details.

Without this guidelines, pushing files on every request even when the browser has cached the files will result in bad performance. [http2-express-autopush](https://www.npmjs.com/package/http2-express-autopush) is recommended to be used instead of programatically pushing the files. It is an expressjs middleware based on [h2-auto-push](https://www.npmjs.com/package/h2-auto-push). This middleware automatically pushes the files when required. You can learn more about it in the above two links.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "http2-express-bridge",
"version": "1.0.4",
"version": "1.0.5",
"description": "wrapper for express app to work with http2 protocol",
"main": "lib/index.js",
"module": "lib/index.js",
Expand Down

0 comments on commit 48b69c4

Please sign in to comment.