{"id":16857,"date":"2020-07-31T10:19:16","date_gmt":"2020-07-31T10:19:16","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=16857"},"modified":"2022-04-28T09:15:20","modified_gmt":"2022-04-28T09:15:20","slug":"jquery-implementation-with-cdn-an-jquery-for-beginners","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/jquery-implementation-with-cdn-an-jquery-for-beginners\/","title":{"rendered":"jQuery Implementation with CDN: An jQuery for Beginners"},"content":{"rendered":"\n<p>In this blog, you are going to learn how we will implement jQuery with <strong>CDN. <\/strong><\/p>\n\n\n\n<p>In the previous blog, we had said that we implement jQuery in three steps, in the first step we download the jQuery, so here we are going to talk about that we will not download the jQuery by applying it via CDN path\u2026.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is CDN Path<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/example23.png\" alt=\"\" class=\"wp-image-16859\"\/><\/figure>\n\n\n\n<p>CDN is the full name of the content delivery network. It is understood in a little detail, suppose you have a visitor to your website and he requested the server to open the website and let me open your website. , Gives CSS and images, and with this, we saw in the previous blog that I have put jQuery, so every time jQuery also gives, in return<br>And mind you have one thousand visitors at a time, then the load will increase every time on the server because it has to provide images, HTML, CSS and JQuery of 30 &#8211; 60 KB each time,<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/jQuery-path.png\" alt=\"\" class=\"wp-image-16860\"\/><\/figure>\n\n\n\n<p>So here there is a solution that when we fetch JQuery file from another server when we fetch it from another server, the load of the server increases because the other three things are HTML, CSS, The images are coming from a server which is its own server.<br>And there is another server from where the file of our jquery is coming, we call it CDN server,<\/p>\n\n\n\n<p>This CDN server is very handy for jQuery,<br>On zquery.com, there are free services of CDN server and Google also offers CDN server services and even then there is a lot of company which provides CDN server for free.<\/p>\n\n\n\n<p>You can implement jquery file by going to it.<br>So this whole process is what we call content delivery network<\/p>\n\n\n\n<p><strong>So now let&#8217;s see how to implement it practically<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/incdul-1.png\" alt=\"\" class=\"wp-image-16861\"\/><figcaption><strong>On this, we downloaded the file of the jQuery and planted<\/strong><\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">How to implement jQuery CDN path<\/h4>\n\n\n\n<p>For this, we have to first go to jquery.com and then click on download.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/douload-1-1024x515.png\" alt=\"\" class=\"wp-image-16862\"\/><\/figure>\n\n\n\n<p>As soon as we scroll down, we will have to go to jQuery with a CDN and click on https:\/\/code.jquery.com.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/cdm.png\" alt=\"\" class=\"wp-image-16863\"\/><\/figure>\n\n\n\n<p>After clicking on https:\/\/code.jquery.com we are getting three types of path.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>jQuery 3.x<\/strong><\/li><li>jQuery 2.x<\/li><li>jQuery 1.x <\/li><\/ul>\n\n\n\n<p>If you want to sport your old browser like &#8211;<br>In Internet Explorer, \u096c \u096d \u096e want to download <strong>jQuery 1.x<\/strong> and Virsen <strong>jQuery 2.x.<\/strong><br>But if you want to create a website that can only see your website on a new browser, then you can download the<strong> jQuery 3.x version<\/strong><\/p>\n\n\n\n<p><strong>on click minified <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/minifi.png\" alt=\"\" class=\"wp-image-16864\"\/><\/figure>\n\n\n\n<p><strong>Copy &lt;script> and paste your code<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/dwonload-cdm.png\" alt=\"\" class=\"wp-image-16865\"\/><\/figure>\n\n\n\n<p><strong>Example<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/cdm-code.png\" alt=\"\" class=\"wp-image-16867\"\/><\/figure>\n\n\n\n<p><strong>result<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/07\/example1-2-1024x316.png\" alt=\"\" class=\"wp-image-16868\"\/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, you are going to learn how we will implement jQuery with CDN. In the previous blog, we had said that we implement jQuery in three steps, in&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[6310],"class_list":["post-16857","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-cdn"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/16857","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=16857"}],"version-history":[{"count":0,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/16857\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=16857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=16857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=16857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}