Why should I use Google's CDN for jQuery?

后端 未结 7 1544
长发绾君心
长发绾君心 2020-11-22 06:21

This may be obvious to some, but I\'ve been wondering: why should I depend on Google\'s server to host jQuery for my site?

Is it only because it loads faster this wa

7条回答
  •  粉色の甜心
    2020-11-22 06:49

    Some good answers here to "Why you should..." and "Why you should not..."

    I simply want to add a list of alternatives to Google if you did want to load jQuery from a CDN.

    • CDN JS - https://cdnjs.com/libraries/jquery
    • Microsoft - https://docs.microsoft.com/en-us/aspnet/ajax/cdn/overview#jQuery_Releases_on_the_CDN_0]2
    • jsDelivr - https://www.jsdelivr.com/package/npm/jquery
    • code.jquery.com (StackPath) - https://code.jquery.com/
    • Google - https://developers.google.com/speed/libraries/#jquery

    But to sum it up, you are basically improving your overall website/application performance.

提交回复
热议问题