Where do you include the jQuery library from? Google JSAPI? CDN?

后端 未结 16 1609
攒了一身酷
攒了一身酷 2020-11-22 09:21

There are a few ways to include jQuery and jQuery UI and I\'m wondering what people are using?

  • Google JSAPI
  • jQuery\'s site
  • your own site/serv
16条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 10:18

    One reason you might want to host on an external server is to work around the browser limitations of concurent connections to particular server.

    However, given that the jQuery file you are using will likely not change very often, the browser cache will kick in and make that point moot for the most part.

    Second reason to host it on external server is to lower the traffic to your own server.

    However, given the size of jQuery, chances are it will be a small part of your traffic. You should probably try to optimize your actual content.

提交回复
热议问题