The jQuery CDN is a way to include jQuery in your website without actually downloading and keeping it your website’s folder. There are a number of jQuery CDN which you can use, examples – Google, Microsoft, Cloudflare, jQuery own CDN & more.
Normally we all first download & put the jQuery file in the website’s folder. Then we reference this file in the page head section.
<head> <script src="files/jquery-3.2.1.min.js"></script> </head>
Instead we can use jQuery CDN by just providing the link of jQuery directly from Google, Microsoft, CloudFlare, etc.
So when using jQuery from the jQuery’s own CDN, we can do:
<head> <script src=" https://code.jquery.com/jquery-3.2.1.min.js"></script> </head>
Notice the src path which links to jQuery file – code.jquery.com.
In the same way we can use jQuery CDN hosted by Google, as shown below:
<head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> </head>
Microsoft also hosts jQuery and this CDN is used in the below head section of the web page:
<head> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script> </head>
CloudFlare is a great CDN and also very popular too. It also has jQuery CDN which you can use in your website.
<head> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> </head>
When you use jQuery CDN then you are actually doing 2 positive things: