jQuery CDN

What is CDN?

A content delivery network or content distribution network (CDN) is a distributed system where users can store data and can access cached content. Usually, we store images, Style sheets, Javascript files, etc.

The use of CDN is very efficient when we have to access some static files. It directly connects to our physical server and provides the resources required, because it connects to the proxy server available in the locality and the nearest.

Que: Why we should Use jQuery CDN?

The CDN sends the data from the cache if available. In most of the cases the user has already history and they already have cached the query. When a new website is opened and using the CDN jQuery, CDN refers to the cached file and hence the zero latency is observed.

  1. Removes server Server Delay
  2. Secure and freely available

Must Read: Javascript Interview Questions

Que: How to use jQuery CDN?

As we all know we use CDN a proxy network to store the static files like images, CSS and javascript files. There are two methods that we can choose from to add jQuery in our application. Any of these methods can facilitate jQuery functionality in our application.

1.Hosted jQuery Files:

We can download a jquery file and upload it to our server and we can fetch it in our application. But downloading from their can increase the loading time of our application and It may take more time to produce the first visible snap of page.

2.jQUery CDN

CDN Hosted jQUery is then the solution of the problem in method one. jQuery CDN is the better way to include jQuery functionality in our application. jQuery CDN removes the server latency and TAT i.e. turn around time. Since CDN is a highly equipped Infrastructure, definitely the speed will be considerable.

We can found the Official jQuery CDN here :

The latest stable version: https://code.jquery.com/

There are two ways of including jQuery CDN:

1. jQuery CDN from Google

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

2. jQuery CDN from Google

<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>

I hope you will get to know what is CDN and how it works jQuery. Now you can understand the difference between the hosted jQuery and CDN jQuery.

Spread the love

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.