The CDN performance of 10 Domestic and international jquery

Source: Internet
Author: User
Tags jquery cdn

jquery is the most common and popular JavaScript library in front-end development, how to load it to make our projects more performance and ask what to use CDN? When users visit their own site loading files from the server, each server can only download 2-4 files, which will reduce the efficiency of the file execution, if more than a few servers, so that the number of simultaneous loading of files is (2-4) * The number of servers, So we put jquery on a CDN to improve the efficiency of loading files on our website. Let's talk about the usual jquery Cdn.

Introduction to CDN:

Baidu Encyclopedia on the introduction of this:

The full name of the CDN is the Content Delivery network, which is the contents distribution networks. The basic idea is to avoid the bottleneck and link of the Internet which may affect the speed and stability of data transmission, and make the content transmission faster and more stable. By placing the node servers in the network, a layer of intelligent virtual network based on the existing Internet, the CDN system can re-direct the user's request to the nearest service node according to the network traffic and the connection of each node, the load condition and the distance and response time of the user. The goal is to enable users to get the content they need, solve the congestion of Internet networks, and improve the responsiveness of users to websites.

Advantage:

    1. Do not worry about your site visitors, at any time, any location, any network operator, can quickly open the site.
    2. Various server virtual host bandwidth and other procurement costs, including the late operation and maintenance costs will be greatly reduced.
    3. To the site directly bring the benefits of: traffic, consulting volume, customer volume, into a single volume, will be greatly improved.
CDN From abroad:
    1. Google Hosted Libraries

      Src= "Http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"

    2. Microsoft CDN

      Src= "Http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.0.min.js"

    3. Cdnjs

      Src= "Http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js"

    4. jquery Official website

      Src= "Http://code.jquery.com/jquery-1.11.0.min.js"

    5. Jsdeliver

      Src= "Http://cdn.jsdelivr.net/jquery/2.0.0/jquery-2.0.0.min.js"

It can be seen that the fastest foreign CDN is CDNJS

CDN in China:
    1. Baidu

      Src= "Http://libs.baidu.com/jquery/2.0.0/jquery.min.js"

    2. Seven cows

      Src= "Http://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"

    3. Sina

      Src= "Http://lib.sinaapp.com/js/jquery/1.6/jquery.min.js"

    4. and shoot the clouds.

      Src= "Http://upcdn.b0.upaiyun.com/libs/jquery/jquery-2.0.0.min.js"

    5. 360

      Src= "Http://libs.useso.com/js/jquery/2.0.0/jquery.min.js"

You can see the fastest in the country is seven cattle

Summarize:

In addition to foreign Google and CDNJS services, the domestic library does not support the HTTPS environment, unfortunately, the domestic users are relatively slow to load, if their own site set up in foreign countries can give priority to use. If the CDN fails to load, we need to load our own local jquery file, just add the following code to the head to

1 <script type= "Text/javascript" src= "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" ></ Script>2 <script>window.jquery | | document.write (' <script src= ' js/jquery-1.11.1.min.js "type=" Text/javascript "><\/script> ') </script >

The speed test above is local, with the network and bandwidth and so has a great relationship, it is best to re-test these CDN in their own environment, if you have other CDN can @me, hope this article can help you.

The CDN performance of 10 Domestic and international jquery

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.