[英]Should I bundle a javascript framework with my application or use a public CDN?
About two or three years ago, I would have summarised the answer to this as. 大约两三年前,我会总结出这个问题的答案。
Now applications seem to be much heavier on javascript. 现在应用程序似乎在javascript上更重。 And I have seen evidence that browsers are able to open more parallel connections. 我已经看到证据表明浏览器能够打开更多并行连接。
What currently is the best practice for web performance when including static assets. 当包含静态资产时,目前最佳的Web性能实践。
When I use a framework like angular, backbone or ember, should I bundle the framework with my application or use a public cdn (like googles https://developers.google.com/speed/libraries/ ) and just bundle my application code? 当我使用像angular,backbone或ember这样的框架时,我应该将框架与我的应用程序捆绑在一起,还是使用公共cdn(如googles https://developers.google.com/speed/libraries/ )并捆绑我的应用程序代码?
I would say the answer is...it depends. 我会说答案是......这取决于。 I appreciate that isn't very useful so I'll expand. 我很欣赏这不是很有用所以我会扩展。
For external apps I'd say using a CDN is the right choice. 对于外部应用程序,我认为使用CDN是正确的选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.