CDN to host jQuery

How jquery works

jQuery is a JavaScript library that can be efficiently used across a wide variety of platforms. It is free, open source software Dual-licensed under the MIT License and the GNU General Public License . It is not just any JavaScript library; it is the most widely used Javascript library in history, putting valuable pre-written Javascript at the fingertips of developers worldwide.

jQuery setup

Officially there are two ways of using jQuery:

  1. Local Installation - You can download jQuery library on your local machine and include it in your HTML code.

  2. CDN Based Version - You can include jQuery library into your HTML code directly from Content Delivery Network (CDN).

Local Installation

There are two versions of jQuery available for downloading:

  1. Production version - this is for your live website because it has been minified and compressed.

  2. Development version - this is for testing and development (uncompressed and readable code).

The uncompressed file is best used during development or debugging; the compressed file saves bandwidth and improves performance in production. Both versions can be downloaded from .

The jQuery library is a javascript file, and you reference it simply by adding to your html file.

However, it's usually a good idea to keep the file name the same as when you downloaded it, as it contains the jQuery version . Also, most sites have a separate folder for their javascript files so you'll need to use the full path in this case.


CDN Based Version

jQuery cdn

Alternatively you can use a content delivery network (CDN) to deliver your jQuery. Both Google and Microsoft host jQuery. Using a content delivery network (CDN) can help improve performance of your jQuery (and website as a whole). When to use jQuery from Google or Microsoft, use one of the following:

Google CDN

Microsoft CDN

FullSource using Google CDN

CDN for jQuery has many advantages. The foremost is the speed because CDN is made for speed only. So jQuery gets downloaded very fast from CDN, in this case making your website to load faster by a few milliseconds .
 (C) 2019    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About