From HTTP/2 to TLS 1.3: Three hidden features that can speed up your website after upgrading to SSL.
An old website, online for several years but never properly optimized, had dozens of JS and CSS files crammed onto its page. It used HTTP/1.1, and while an SSL certificate was installed, it was just for show, with no attention paid to the protocol version. Every time I opened this website, the loading circle in the lower right corner of the browser's address bar took a long time to spin. Looking at the Timeline in Chrome's developer tools, the "Stalled" section took almost two seconds. At first, I thought it was due to insufficient bandwidth or a weak server CPU. Later, I realized that I had been treating HTTPS as a "security protection fee"—thinking that encryption meant sacrificing some speed, which was perfectly reasonable. But in fact, upgrading from HTTP/1.1 to HTTP/2, and then upgrading the TLS version from 1.2 to 1.3, can, in some scenarios, not only not slow down page loading speed, but can actually be faster than plaintext HTTP. This article will discuss three speed-boosting features that you can easily gain after upgrading your SSL certificate.
The first hidden feature: Multiplexing, turning congested requests into high-speed ones
To understand why HTTP/2 speeds up websites, you need to understand how inconvenient HTTP/1.1 was. HTTP/1.1 requests were serial—one request had to be responded to before the next could be sent. Imagine accessing a website with over eighty resources; browsers processed them one by one. How long would it take for a desktop user to wait? To compensate for this inefficiency, browsers would open six to eight TCP connections simultaneously for each domain to make concurrent requests. Sounds good, right? But these connections themselves have overhead—six connections, each requiring a TCP handshake and a TLS handshake, each consuming resources on both the client and server. And it didn't solve the fundamental problem: if the first request on a connection was delayed by a slow database query for three seconds, all requests following that connection had to wait, with no way to resolve the issue. This is the so-called head-of-line blocking problem.
How does HTTP/2 solve this problem? Its core is multiplexing—establishing numerous bidirectional "streams" over a single TCP connection. Each stream independently processes all responses to a request, and these streams can be interleaved without interference. In layman's terms: Previously, if you drove to three different locations to pick up people, dropping them off one at a time, you had to make three trips. Now, you use a large van to pick up all three and deliver them all at once. As a result, you no longer need to wait for previous requests to complete; all resources start loading almost simultaneously. A technical test conducted by the Alibaba Cloud developer community shows specific data: compared to HTTP/1.1, HTTP/2 can reduce the first-screen rendering time by 30% to 50%. Data from the international performance testing website DebugBear also corroborates this conclusion—HTTP/2 allows concurrent request execution, resulting in shorter response times and the fastest overall loading speed. Furthermore, because only one TCP connection is maintained, both the server and client save significant overhead that would otherwise be used to manage multiple connections, which is particularly noticeable in scenarios with high-frequency API interactions. Visitors to your website may be using mobile devices in weak network environments, or even on subways or high-speed trains with fluctuating signal strength. In these situations, the channel aggregation capabilities of multiplexing allow the page to complete its initial rendering faster.
The second hidden feature: HPACK header compression – the invisible elephants disappear.
Many developers transitioning from the HTTP/1.1 era have almost no concept of header overhead. You may have seen a long string of request headers in Chrome Developer Tools, containing various fields such as Cookie, User-Agent, Accept, and Referer. This header information is repeatedly transmitted in every request, and most of it is the same redundant data. A small website can waste tens of gigabytes of bandwidth every month just by sending these repetitive header data back and forth every time a page is accessed. Even more problematic is that in poor network conditions, these extra bytes can slow down the entire page's first byte rendering time. HTTP/2 introduced a compression algorithm called HPACK – maintaining a static table and a dynamic table on both the client and server sides, remembering common header fields and their corresponding index values on both ends, and sending only the index number in each transmission. The sending end also uses Huffman coding, assigning shorter codes to frequently occurring characters, further shortening the data transmission length. According to actual upstream test data, HTTP/2 header compression can reduce the amount of transmitted data by 70% to 85% compared to ordinary uncompressed text. Imagine, the header size of each request used to be about 500 to 800 bytes; now it's only tens or even a dozen bytes, and the saved bandwidth can be used to transmit the actual page content. Moreover, with a smaller header size, the network speed requirement naturally decreases. One often underestimated benefit of this technology is that it shares a compression context across all streams within the same TCP connection. Over time, the header patterns accumulated in the dynamic table become richer, and the compression efficiency continues to improve.
The third hidden feature: TLS 1.3's simplified handshake and 0-RTT fast reconnection
I've heard far too many complaints about encryption slowing down websites. This statement was indeed accurate in the TLS 1.2 era. Establishing an HTTPS connection between two endpoints on the internet required two complete round-trip communications for the TLS handshake (technically called 2-RTT). Adding the underlying TCP three-way handshake, a user accessing your website would have to wait through several rounds of latency just to establish a secure connection. In typical high-latency cross-regional network environments like mainland users accessing Hong Kong servers, a single RTT could reach 150 to 200 milliseconds or even higher, accumulating to 300 to 400 milliseconds of wasted time. And this is just for the initial access—you've used a lot of CDNs and optimized all your caching, but the user hasn't even seen any content on your website yet, and they're already waiting half a second for the handshake to complete.
TLS 1.3 significantly restructured this process. It streamlined the key negotiation, which required two round trips in TLS 1.2, to a single round trip, reducing the initial connection latency from 2-RTT to 1-RTT, directly reducing the latency of the initial connection by more than 50%. Loading time for a single user has decreased from 300 milliseconds to less than 150 milliseconds, and this reduction applies to every first-time visitor. But you might ask: what about returning users? TLS 1.3 provides a session recovery mechanism that allows for fast reconnection with 0-RTT—after the initial handshake, the server generates a session ticket and pushes it to the client, which caches it. When the same user revisits your website a few hours later, this recently used secure channel can be quickly reused. The client sends encrypted data directly during the handshake, without waiting for any complete handshake to finish. According to a research report from eMudhra, this is particularly beneficial for high-frequency API calls and mobile applications, as the latency of re-establishing an encrypted connection is almost zero. You might ask, can 0-RTT guarantee complete security? It carries a potential risk of replay attacks, but mainstream implementations offer fairly mature protection measures, which can usually be mitigated by combining enterprise-grade API gateways and usage restriction policies. In reality, for ordinary personal blogs and small to medium-sized business websites, your biggest headache is often not the minor security risks of 0-RTT, but rather that your server configuration doesn't even have TLS 1.3 enabled, forcing each returning user to repeat the expensive full handshake. In addition, TLS 1.3 has phased out a bunch of outdated weak encryption algorithms like RC4 and 3DES, retaining only AES-GCM authentication encryption, reducing the server's encryption computation load by at least 20% to 30%, completing the same encryption task with fewer CPU cycles.
The fourth hidden gem: Less encryption parameter negotiation
The previous three features are already the main battleground for speed improvements, but there's another optimization working silently at the underlying level that's often overlooked—TLS 1.3 significantly reduces the number of parameters that need to be negotiated during the handshake process, simplifying it from the numerous and cumbersome cipher suites of TLS 1.2 to just a few essential security options. In TLS 1.2, the server had to choose the one supported by both parties from hundreds or even thousands of cipher combinations, a process that was both time-consuming and increased the risk of errors. TLS 1.3 directly abandons insecure or outdated exchange methods and encryption combinations, retaining only modern, certified encryption algorithms. The handshake message itself is also shorter because the client completes all necessary key sharing with the server in the first message, reducing subsequent message exchange rounds. This change isn't as noticeable as 0-RTT, but for high-concurrency systems, every few bytes saved and one cross-negotiation reduced can visibly improve overall throughput. Especially for small to medium-sized Hong Kong cloud servers like those with 2 cores and 4GB of RAM, once the CPU load is reduced, your business capacity will be significantly enhanced.
Over-optimization to be wary of
Since HTTP/2 and TLS 1.3 offer so many benefits, should you discard all traditional optimization methods and rely entirely on these protocols? Absolutely not. File merging and sprite sheets were lifesavers in the HTTP/1.1 era. With HTTP/2, multiple small requests are no longer a performance bottleneck, so some developers have reversed this by splitting merged files into smaller chunks for multiplexing and loading. This approach itself isn't wrong. However, over-reliance on protocol optimization can sometimes backfire. For example, the memory limit of dynamic tables can become a new bottleneck on some high-concurrency servers. If `http2_max_concurrent_streams` is set too high or the number of connections per machine is too large, HPACK dynamic tables can consume considerable memory resources.
Similarly, while 0-RTT is extremely fast on secondary accesses, its replay attack risk necessitates additional defenses in certain high-frequency trading scenarios. You can't simply flip the switch and assume everything is fine. Optimization is like playing chess; you must consider your opponent's possible reactions before making each move.
CN
EN