Bundling .js files vs CDN

前端 未结 4 1291
有刺的猬
有刺的猬 2020-12-23 17:06

In order to improve performance of our web pages, we are recommended to use CDNs to serve .js files on our web pages. That makes sense.

Also, we are rec

4条回答
  •  感动是毒
    2020-12-23 18:01

    Why can't you bundle them and place them are the CDN? It should hardly be a decision of one or the other?

    If you have to choose one or the other, it depends on how many .js files you are including. For a small number of files, I'd suggest that a CDN would be quicker, where-as for a greater number of files, a bundle of .js files would definitely be quicker. Where the switch-over would be, is something for you to experiment with.

提交回复
热议问题