1 00:00:00,500 --> 00:00:03,770 DOM manipulation, events, and traversal. 2 00:00:03,770 --> 00:00:07,290 As we've seen, they're all made easier by jQuery. 3 00:00:07,290 --> 00:00:09,640 There's one last thing I want to show you. 4 00:00:09,640 --> 00:00:13,440 A potentially better way to add jQuery to your projects. 5 00:00:13,440 --> 00:00:16,720 If you visit jQuery.com and go to the download page, 6 00:00:17,740 --> 00:00:22,180 there's a section on CDNs, or Content Delivery Networks. 7 00:00:23,650 --> 00:00:28,987 CDNs allow websites and applications to serve content like HTML, CSS, 8 00:00:28,987 --> 00:00:34,073 images, videos and JavaScript files from servers nearby the user. 9 00:00:34,073 --> 00:00:38,923 CDNs can offer a performance benefit by hosting jQuery on servers spread 10 00:00:38,923 --> 00:00:40,480 across the globe. 11 00:00:40,480 --> 00:00:44,929 This also offers an advantage that if the visitor to your website has already 12 00:00:44,929 --> 00:00:49,740 downloaded a copy of jQuery from the same CDN it won't have to be re-downloaded. 13 00:00:49,740 --> 00:00:54,166 This means that using a CDN to load common JavaScript libraries, 14 00:00:54,166 --> 00:00:58,680 like jQuery, will often result in faster loading webpages. 15 00:00:58,680 --> 00:01:00,660 The less waiting users have to do, 16 00:01:00,660 --> 00:01:03,390 the more likely they are to stay on your website. 17 00:01:03,390 --> 00:01:05,688 This is especially true for mobile users. 18 00:01:05,688 --> 00:01:12,152 Click on code.jquery.com and we can see a number of versions of jQuery. 19 00:01:12,152 --> 00:01:15,990 We'll select the minified version for version 3. 20 00:01:15,990 --> 00:01:18,750 Minified means that all unnecessary characters and 21 00:01:18,750 --> 00:01:23,090 spaces have been removed from the code making it extremely difficult for 22 00:01:23,090 --> 00:01:26,460 humans to read, but faster for a computer. 23 00:01:26,460 --> 00:01:29,800 Code is minified to improve speed and performance. 24 00:01:29,800 --> 00:01:33,460 For projects where it's unlikely that you'll need to get into the jQuery and 25 00:01:33,460 --> 00:01:36,640 read or modify anything, which will probably be the vast 26 00:01:36,640 --> 00:01:41,270 majority of your projects, it's advisable to use the minified version. 27 00:01:41,270 --> 00:01:43,820 This code snippet can be included in the bottom of 28 00:01:43,820 --> 00:01:46,770 any page where you'd normally include jQuery. 29 00:01:46,770 --> 00:01:53,200 So let's copy this, go to our HTML file, and replace our jQuery script tag. 30 00:01:58,250 --> 00:02:02,759 Save, and now we can delete jQuery from our local files. 31 00:02:06,961 --> 00:02:12,531 As you can see if we preview, the jQuery is now loaded from an external host, 32 00:02:12,531 --> 00:02:15,240 and our project functions the same. 33 00:02:19,137 --> 00:02:22,872 See the teacher's notes for more information about the pros and 34 00:02:22,872 --> 00:02:26,550 cons of using a CDN versus including the files in your project. 35 00:02:27,550 --> 00:02:31,480 I hope you've enjoyed this tour of the basic functionality of jQuery. 36 00:02:31,480 --> 00:02:35,030 As countless blogs, articles, and developers out there will tell you, 37 00:02:35,030 --> 00:02:38,310 you may not need jQuery as much as you once would have. 38 00:02:38,310 --> 00:02:40,460 You may not need jQuery at all. 39 00:02:40,460 --> 00:02:43,680 Perhaps you will always be able to count yourself among the lucky, 40 00:02:43,680 --> 00:02:46,200 who need not support older browsers, like IE9. 41 00:02:47,280 --> 00:02:51,720 However, jQuery is still used in a vast portion of the web and 42 00:02:51,720 --> 00:02:54,030 will likely stick around for awhile. 43 00:02:54,030 --> 00:02:58,190 It's used in mountains of legacy websites, in popular HTML and 44 00:02:58,190 --> 00:03:03,476 CSS frameworks like Bootstrap, and in large ecosystems like WordPress. 45 00:03:03,476 --> 00:03:06,930 It's wealth of plug-ins and resources can help you rapidly build and 46 00:03:06,930 --> 00:03:09,910 add functionality and features to your projects. 47 00:03:09,910 --> 00:03:14,297 Don't be afraid to use it when using it saves time and makes sense. 48 00:03:14,297 --> 00:03:16,410 I can't wait to see what you build. 49 00:03:16,410 --> 00:03:19,190 Until next time, have fun, and happy coding.