- Progressive Web Application Development by Example
- Chris Love
- 360字
- 2021-08-05 10:33:25
HTTPS can be significantly faster than HTTP
Some technologies designed to make websites faster only work with HTTPS. One example is a protocol enhancement known as HTTP/2. Take the HTTP versus HTTPS test to see this in action (see https://www.httpvshttps.com/ for details).
When I first saw research showing HTTPS to be faster, I admit I was skeptical. I saw how much time the encryption adds in network waterfalls. Fortunately, the folks managing browsers and network stacks have done us a solid and smoothed out many of the issues that cause SSL to be slower than non-SSL, as illustrated in the following quote from Adam Langley at Google:
Because HTTP/2 multiplexes requests through a single connection, there is only one TLS handshake that must be completed. This reduces the time to retrieve assets and server load. Now the client and the server only need to perform a single handshake and encryption cycle.
The goal of HTTP/2 is to improve performance by undoing the shortcomings of the HTTP/1.1 specification. HTTP/2 eliminates connections by multiplexing responses, compressing headers, prioritizing responses, and allowing server-side push, as shown in the following image:

All browsers support HTTP/2 and most servers do as well. Windows 2016 was the last major operating system to ship HTTP/2 support. Since it is relatively new, there are not many production deployments online.
HTTP/2 does not change any of the HTTP semantics. Status codes, verbs, and other such phrases are things we have used for years, and thus will not break existing applications.
The de facto implementation that standard browsers are enforcing is HTTP/2 over TLS. While you could technically use HTTP/2 without TLS, browsers do not allow this approach.
The combination of the single connection and TLS handshake in concert with the other performance benefits that HTTP/2 offers mean that TLS is consistently faster than HTTP.
- 6G潛在關(guān)鍵技術(shù)(下冊)
- Modern JavaScript Web Development Cookbook
- 網(wǎng)絡(luò)故障現(xiàn)場處理實踐(第4版)
- 社交電商運營策略、技巧與實操
- Force.com Development Blueprints
- 信息通信網(wǎng)絡(luò)建設(shè)安全管理概要2
- 局域網(wǎng)組建、管理與維護項目教程(Windows Server 2003)
- Building RESTful Web Services with Spring 5(Second Edition)
- 中國互聯(lián)網(wǎng)發(fā)展報告2018
- 圖解手機元器件維修技巧
- Mastering Dart
- 6G新技術(shù) 新網(wǎng)絡(luò) 新通信
- VMware NSX網(wǎng)絡(luò)虛擬化入門
- 網(wǎng)絡(luò)利他行為研究:積極心理學(xué)的視角
- TCP/IP基礎(chǔ)(第2版)