官术网_书友最值得收藏!

Understanding CDN for jQuery

A Content Delivery Network (CDN) hosts content for users through large distributed systems. The advantage of using a CDN is to improve the performance. When using a CDN to retrieve the jQuery library, if the files have been downloaded earlier, they will not be re-downloaded. This can help you improve the response time.

How to do it…

The following CDNs are available for jQuery files:

  • jQuery's CDN provided by MaxCDN
  • The Google CDN
  • The Microsoft CDN
  • The CDNJS CDN
  • The jsDelivr CDN

To include jQuery on a web page, the URL of the respective CDN can be used so that files can be directly served from the CDN instead of using the local copies. The following table summarizes the respective CDN URLs for jQuery files:

Using CDNs for new releases

Note that CDNs may not have the latest files when new versions of the jQuery library are launched since it usually takes a couple of days for third-parties to update their files. In the case of new releases, always check the available version before downloading them.

How it works…

CDNs consist of servers situated in data centers in strategic locations across the globe. When a client requests a resource from a CDN, the server that is geographically closest to the client processes the request. These servers are also known as edge servers. In addition to this, edge servers have a caching mechanism to serve various assets. All this helps you improve the client's response time.

See also

The Using NuGet Package Manager to download jQuery recipe

主站蜘蛛池模板: 法库县| 宜兰县| 南丹县| 轮台县| 林口县| 旌德县| 枣强县| 哈巴河县| 巴塘县| 来宾市| 沂水县| 三门县| 新竹县| 锡林浩特市| 将乐县| 明光市| 宣威市| 长春市| 兴业县| 六盘水市| 休宁县| 钟山县| 娱乐| 南陵县| 麻江县| 尚义县| 敦化市| 金阳县| 贵南县| 华阴市| 逊克县| 崇州市| 朝阳区| 资阳市| 靖远县| 宾阳县| 丹江口市| 汝阳县| 宜春市| 四平市| 临江市|