Why bundle optimizations are no longer a concern in HTTP/2

后端 未结 4 659
温柔的废话
温柔的废话 2020-12-04 19:52

I read in bundling parts of systemjs documentation that bundling optimizations no longer needed in HTTP/2:

Over HTTP/2 this approach may be preferable

4条回答
  •  渐次进展
    2020-12-04 19:52

    Bundling is still useful if your website is

    1. Served on HTTP (HTTP 2.0 requires HTTPS)
    2. Hosted by a server that does not support ALPN and HTTP 2.
    3. Required to support old browsers (Sensitive and Legacy Systems)
    4. Required to support both HTTP 1 and 2 (Graceful Degradation)

    There are two HTTP 2.0 features that makes bundling obsolete:

    1. HTTP 2.0 Multiplexing and Concurrency (allows multiple resources to be requested on a single TCP connection)
    2. HTTP 2.0 Server Push (Server push allows the server to preemptively push the responses it thinks the client will need into the client's cache)

    PS: Bundling is not the lone optimization technique that would be eliminated by the insurgence of HTTP 2.0 features. Features like image spriting, domain sharding and resource inlining (Image embedding through data URIs) will be affected.

    How HTTP 2.0 affects existing web optimization techniques

提交回复
热议问题