Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http、http1.0、http1.1、https、spdy、http2.0 浅对比总结 #60

Open
shiiiiiiji opened this issue Oct 27, 2018 · 0 comments
Open

Comments

@shiiiiiiji
Copy link
Owner

shiiiiiiji commented Oct 27, 2018

HTTP协议,基于TCP的一个传输协议。针对前端而言,一般有如下性能指标:

http1.1

  • 缓存处理:http1.0只有Expires等缓存标准,http1.1引进了更多的缓存控制策略,ETag等
  • 长连接:开启keep-alive

https

  • 端口不同80/443
  • http直接基于tcp,传输的都是明文。https在http和tcp之间多了ssl/tls层,用于报文的加密
  • 加密需要提前去CA申请证书
  • 可有效防止运营商劫持

spdy/http2

  • 多路复用:共享一个tcp连接
  • 请求优先级
  • header压缩:两者算法不同
  • spdy强制使用https,http2支持http
@shiiiiiiji shiiiiiiji changed the title http、http1.1、https、spdy、http2.0 HTTP、HTTP 1.1、HTTPs、spdy、HTTP 2.0 Oct 27, 2018
@shiiiiiiji shiiiiiiji changed the title HTTP、HTTP 1.1、HTTPs、spdy、HTTP 2.0 HTTP、HTTP 1.1、HTTPs、spdy、HTTP 2.0 浅对比总结 Oct 31, 2018
@shiiiiiiji shiiiiiiji changed the title HTTP、HTTP 1.1、HTTPs、spdy、HTTP 2.0 浅对比总结 http、http1.0、http1.1、https、spdy、http2.0 浅对比总结 Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant