FREELessons: 11Length: 32 minutes

Next lesson playing in 5 seconds

  • Overview
  • Transcript

2.6 CDN Suggestions

Using a Content Delivery Network is a great way to link to commonly used libraries like jQuery and Bootstrap. In this lesson, you will learn about a plugin that will give you quick access to all of the most popular CDN links available.

Related Links

2.6 CDN Suggestions

Hello and welcome back. In this lesson, we're going to take a look at a plugin that will help us to very quickly find links for CDN's or content delivery networks. So if you wanted to use the CDN link for jQuery, instead of actually downloading jQuery and storing it on your system, then you would use a CDN link, and we could use this particular plugin to help us fill out that CDN link a lot quicker without having to remember it or without having to go to the jQuery site to find it. So let's go to our extensions, and I'm going to do a search for CDN. And maybe we need to do a more specific search. Let's do CDN suggestions. And here we go. Javascript and CSS CDN suggestions. So let's click on install. And that installation was successful. Now let's come up to the head of our document. If you prefer to put your scripts at the bottom of your document, you can do that as well. But for now, I'm just going to put it at the head for the sake of illustrating this. I'm going to create a script tag here. And then when I hit space, you will notice it gives us a drop down list of a bunch of options. And right now it's just everything from one to a, but if we start typing something in, if we start typing in jQuery, for example, then it will give us a bunch of version numbers that we could choose from and 3.2.1 is the latest. We can just click on that, and it will fill that out for us. So as you can imagine, there are a lot of helpful suggestions here. If we start typing in another script tag here, by the way, if you're gonna use this extension, I'd suggest not using the image shortcuts for the script element. Don't just type script and hit Tab, instead just start typing it out like you normally would a script element. Because it's when you hit Space after typing script inside that opening angle bracket that it's gonna give you these code hints. So if we were to start typing in Bootstrap. When we hit Enter, it gives us a list of versions, and here's 4.0.0-alpha 5. If we don't want the alpha version, we can jump down to version 3, but either way, once we click on the option we want, it's gonna fill that out for us. So you can imagine we can also do a link tag here. If we want the Bootstrap CSS we could get that as well. So we're using scripts to get the bootstrapped JavaScript files and we are reusing a link tag at the bootstrap CSS files, excuse me. So I'll choose the same 4.0.0 alpha. And there we go it fills it out for us. So as you can imagine this can save you a lot of time when you're setting up your documents. I personally like to use CDNs quite a bit. I use it for jQuery and I use it for Bootstrap, so it does save me a lot of time. So thank you again for watching and we'll see you in the next lesson.

Back to the top