jquery cdn_如何从CDN添加jQuery? Google,Microsoft,Cloudflare的jQuery CDN列表

jquery cdn

jquery cdn

jQuery is a popular JavaScript framework project and library which is used for event handling, CSS animation, and Ajax. jQuery is an open-source library which made it very popular. CDN is Content Delivery Network or Content Distribution Network which is used to distribute files, images, CSS, Javascript, and HTML content over the world into different servers and provide to the client which is the nearest one. This will make the load timeless for a web page because of physical proximity.

jQuery是流行JavaScript框架项目和库,用于事件处理,CSS动画和Ajax。 jQuery是一个开源库,因此非常流行。 CDN是内容分发网络或内容分发网络,用于将世界各地的文件,图像,CSS,Javascript和HTML内容分发到不同的服务器中,并提供给最近的客户端。 由于物理上的接近,这将使网页的加载时间变得很长。

jQuery CDN的好处 (jQuery CDN Benefits)

As a popular JavaScript framework and library jQuery is provide via CDNs over the world. This will create the following benefits if the CDN is used for jQuery.

作为流行JavaScript框架和库,jQuery通过世界各地的CDN提供。 如果CDN用于jQuery,这将产生以下好处。

  • Faster load time for the web page or application can be reached.

    可以达到网页或应用程序更快的加载时间。
  • Faster load time will cause a better SEO with improved SERP

    更快的加载时间将通过改善SERP带来更好的SEO
  • CDNs are more reliable than single servers where the uptime will be better.

    CDN比单台服务器的可靠性更高,后者的正常运行时间会更好。
  • Lower the load of the webserver by migrating the jQuery to CDN.

    通过将jQuery迁移到CDN来降低Web服务器的负载。

jQuery版本 (jQuery Versions )

jQuery is provided with different versions for less size or less functionality. These versions are called and named below.

jQuery提供了不同的版本,以减少大小或功能。 这些版本的名称如下。

jquery.js is the normal jQuery file which is not slim or minified. This version is size is bigger than the others.

jquery.js是普通的jQuery文件,没有苗条或缩小。 这个版本的大小大于其他版本。

jquery.min.js is the minified version of the jQuery where spaces and unnecessary characters are removed to make size less.

jquery.min.js是jQuery的缩小版,其中删除了空格和不必要的字符以减小尺寸。

jquery.slim.js is the less functional version where some less used functions are removed.

jquery.slim.js是功能较少的版本,其中删除了一些较少使用的功能。

jquery.slim.min.js is the smallest version where spaces and unnecessary characters and some functions are removed.

jquery.slim.min.js是最小的版本,其中删除了空格和不必要的字符以及某些功能。

本地服务器jQuery (Locally Server jQuery)

Let’s start with locally served jQuery which means jQuery file is located on the webserver. We will just provide the path of the jQuery for our web server.

让我们从本地服务的jQuery开始,这意味着jQuery文件位于Web服务器上。 我们将只为我们的Web服务器提供jQuery的路径。

<head>
   <script src="jquery/3.5.1/jquery.js"></script>
</head>
<head>
   <script src="jquery/3.5.1/jquery.min.js"></script>
</head>
<head>
   <script src="jquery/3.5.1/jquery.slim.js"></script>
</head>
<head>
   <script src="jquery/3.5.1/jquery.slim.min.js"></script>
</head>

通过Google CDN添加jQuery (Add jQuery via Google CDN )

Google provides CDN support for the jQuery via the googleapis.com domain. Google CDN for jQuery can be used as below for normal, slim, minimal, and slim+minimal versions.

Google通过googleapis.com域为jQuery提供CDN支持。 jQuery的Google CDN可以按以下方式用于普通,超薄,最小和超薄+最小版本。

<head>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.js"></script>
</head>
<head>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<head>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.slim.js"></script>
</head>
<head>
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js"></script>
</head>

通过Microsoft CDN添加jQuery (Add jQuery via Microsoft CDN)

Microsoft is also another company that provides CDN for the jQuery library. Microsoft CDN for jQuery can be used like below for normal, slim, minimal, and slim+minimal versions.

微软还是另一家为jQuery库提供CDN的公司。 jQuery的Microsoft CDN可以像下面那样用于正常,苗条,最小和苗条+最小版本。

<head>
   <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.1.js"></script>
</head>
<head>
   <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.1.min.js"></script>
</head>
<head>
   <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.1.slim.js"></script>
</head>
<head>
   <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.1.slim.min.js"></script>
</head>

通过CloudFlare CDN添加jQuery (Add jQuery via CloudFlare CDN)

Cloudflare is the most popular DDOS and CDN service on the net. Cloudflare CDN for jQuery can be used like below for normal, slim, minimal, and slim+minimal versions.

Cloudflare是网络上最流行的DDOS和CDN服务。 jQuery的Cloudflare CDN可以像下面那样用于正常,苗条,最小和苗条+最小版本。

<head>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js"></script>
</head>
<head>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<head>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.js"></script>
</head>
<head>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js"></script>
</head>
LEARN MORE  Introduction to Javascript Programming Language
了解更多Javascript编程语言简介

翻译自: https://www.poftut.com/how-to-add-jquery-from-cdn-jquery-cdn-list-for-google-microsoft-cloudflare/

jquery cdn

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值