Difference between using local JS and JS from CDN

I am trying to write a JavaScript script to populate HTML using jQuery and Bootstrap. In many tutorials on the Internet, educators mention using files from a Content Delivery Network (CDN) instead of naming the files locally.

But I can't foresee any benefits of calling js or CSS over the net instead of loading it locally, which should be good enough.

I really want to know what is the difference in terms of network and machine resources and page loading.

+3


source to share


1 answer


Professionals using CDNs: * client side library cache.

Against using a CDN: * If the cdn site is down, your site will not receive the files. * The cdn file changes frequently, so your site will work with the newest files you haven't checked (this can be very dangerous).



Now you might be wondering if this is the right fit for your site.

+3


source







All Articles