为什么捆绑包优化不再是HTTP / 2中的关注点 [英] Why bundle optimizations are no longer a concern in HTTP/2
问题描述
我阅读了systemjs文档的捆绑部分,这些部分在其中不再需要捆绑优化HTTP / 2 :
I read in bundling parts of systemjs documentation that bundling optimizations no longer needed in HTTP/2:
在HTTP / 2上,此方法可能更可取,因为它允许文件分别为
Over HTTP/2 this approach may be preferable as it allows files to be individually cached in the browser meaning bundle optimizations are no longer a concern.
我的问题:
- 这意味着在使用HTTP / 2时我们不需要考虑捆绑脚本或其他资源吗?
- 其中包含什么通过HTTP / 2启用此功能?
推荐答案
HTTP / 2支持服务器推送淘汰了资源捆绑。因此,是的,如果您使用的是HTTP / 2,则捆绑实际上是一种反模式。
HTTP/2 supports "server push" which obsoletes bundling of resources. So, yes, if you are you using HTTP/2, bundling would actually be an anti-pattern.
有关更多信息,请检查以下内容:https://www.igvita.com/2013/06/12/innovating-with-http- 2.0-server-push /
For more info check this: https://www.igvita.com/2013/06/12/innovating-with-http-2.0-server-push/
这篇关于为什么捆绑包优化不再是HTTP / 2中的关注点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!