Deliver JavaScript Files with a Content Distribution Network


show more There's a better way to delivery JavaScript files: let someone else do it. Learn how content distribution networks from companies like Google and Microsoft allow you to deliver your code faster, across a global-wide platform that includes load balancing and failover. show less
please wait ...

Using a content distribution network to deliver JavaScript files

We've seen that it's simple to download jQuery so that you have a copy of the file on your site to send to your users. But there is a better way: let somebody else do it. Several companies, including Google and Microsoft, allow you to link to jQuery, and some other common libraries, and get that file directly from their servers. And they don't just have one server but typically a bunch of geographically distributed servers with load balancing and failover, all in a Content Distribution Network, or CDN, so it's almost always faster for the user to get it from one of their servers than from your server.

And using this is all free, and it's super easy. All you do is in your HTML you find your script tag where you're linking to the local copy of the file and you just change it to use, say, Google's link to it. You're not changing anything else about your own site. You're still hosting your site and your pages the same way you ever did, and that's it; you&...

Using a content distribution network to deliver JavaScript files
Video duration: 4m 49s 5h 31m Beginner

Viewers:

There's a better way to delivery JavaScript files: let someone else do it. Learn how content distribution networks from companies like Google and Microsoft allow you to deliver your code faster, across a global-wide platform that includes load balancing and failover.

Subjects:
Developer Web
Software:
JavaScript
Author:
please wait ...