Node app to compare http 1 vs 2 protocol.
Clone
git clone https://github.com/humbertodias/node-http-1-vs-2.git
cd node-http-1-vs-2
npm install
HTTP/1
node http-1.js
Browser
http://localhost:3001
HTTP/2
node http-2.js
Browser
https://localhost:3002
http/2 spent 223/48 = 4.66x less bytes than http/1 response.
Protovcol | Size | Time |
---|---|---|
http/1 | 223B | 25ms |
http/2 | 48B | 21ms |
Comparison
node http-compare.js
Browser
http://localhost:3003
The original image has 512x512 and each tile was cropped as 16x16
convert -crop 16x16 img/nodejs.png img/tile-%d.png