Do I need to cache the bust in HTTP / 2?

In HTTP / 1, in order to avoid additional network requests that determine whether resources should remain cached, we would set the value to max-ageeither Expiresstatic assets and provide them with a unique URL for each revision. But HTTP / 2 requests are cheap, so we can do without caching and just rely on ETags, last-modified, et al?

The only advantage that I see when continuing to work with the cache (in addition to clients serving HTTP / 1 and HTTP / 2) is that it saves bandwidth checking if the resources are out of date. And even that is likely to be negligible with HPACK. So am I missing something, or can I stop caching now?

+4
source share
1 answer

The β€œnecessary” part depends on how you feel about performance. In short, if you can live with three or four round trips, then a cache break is not required. Otherwise, destroying the cache remains the only way to delete them.

Here are a few arguments related to HTTP / 2 vs HTTP / 1.1, the latency problem and the use of HTTP / 2 Push.

HTTP / 2 requests are not instant

  • HTTP/2 , HTTP/1.1, . HTTP/1.1, TCP- , . TCP-, , TCP , TCP- HTTP/1.1 , TCP/2-TCP-. HTTP/2 , .

  • HTTP/2 . (RTT) ( HTTP/2 Ping), , , RTT 200 280 . 304 1 RTT. , , RTT.

HTTP/2 Push RTT, , . , !

HTTP/2 Push

, , , .

  • (, - max-age), . , HTTP/2 Push.

  • 304 revalidations - . max-age.

, RTT , -, - , - , .

.

Url -

+7

All Articles