博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[HTTP2] HTTP1 probs and HTTP2 saves
阅读量:5075 次
发布时间:2019-06-12

本文共 1752 字,大约阅读时间需要 5 分钟。

1. HOL (HEADS of LINE BLOCKING)

Too many requests in the header tag. Broswer can allow 6 reuqest to be handled simultaneously. And each request and its response make up a round trip. As we all know round trip is bad, it cost time and force use waiting so we want to reduce the round trip as much as possilbe.

 

2. Uncompressed Headers

Broswer can help to compressed the data when send to the server, but the broswer doesn't compress the HEAD. But usually HEAD are always the same.

And those HEAD takes 800 Bytes. If 100 request then takes 80kb.

But HTTP1 doesn't help with that.

 

3. Security

HTTP + TLS = HTTPS. HTTP2 require HTTPS by default. So it also need TLS by defualt.

 

---------------

HTTP2

1. By multiplex :

a system or signal involving simultaneous transmission of several messages along a single channel of communication

Combine multi sinlges into one sinlge. With HTTP2, now we have one connection instead of six.

HTTP2 devid Connection in HTTP1 into multi stream and share one connection. If one stream is blocked, another stream will take over which will be good to take fully used of idel time.

 

2. HEAD will be compressed. Now HEAD never been sent twice since they are the same, instead, will just send the reference.

 

If we load the same website on one HTTP1 server and another HTTP2, the difference:

 The tab down below is HTTP2 server, as we can see, because of the compression and HEAD and stream solution. HTTP2 is much faster than HTTP1 server.

 

Beause HTTP2 check the HEAD (caching) more efficient, it turns out not necessary to bunld your css and js files, because you change on single js file, it will force the broswer to redownload the whole bundle.js. But minifiy is still good.

转载于:https://www.cnblogs.com/Answer1215/p/5636337.html

你可能感兴趣的文章
C# Async与Await的使用
查看>>
Mysql性能调优
查看>>
iOS基础-UIKit框架-多控制器管理-实例:qq界面框架
查看>>
自定义tabbar(纯代码)
查看>>
小程序底部导航栏
查看>>
poj1611 简单并查集
查看>>
Ubuntu 14.04下安装CUDA8.0
查看>>
跨平台开发 -- C# 使用 C/C++ 生成的动态链接库
查看>>
C# BS消息推送 SignalR介绍(一)
查看>>
WPF星空效果
查看>>
WPF Layout 系统概述——Arrange
查看>>
PIGOSS
查看>>
软件目录结构规范
查看>>
mysqladmin
查看>>
解决 No Entity Framework provider found for the ADO.NET provider
查看>>
设置虚拟机虚拟机中fedora上网配置-bridge连接方式(图解)
查看>>
ES6内置方法find 和 filter的区别在哪
查看>>
Android实现 ScrollView + ListView无滚动条滚动
查看>>
java学习笔记之String类
查看>>
UVA 11082 Matrix Decompressing 矩阵解压(最大流,经典)
查看>>