William Jiang

JavaScript,PHP,Node,Perl,LAMP Web Developer – http://williamjxj.com; https://github.com/williamjxj?tab=repositories

Tag Archives: CDN

CDN (Content delivery network)

According to Wikipedia, content delivery network or content distribution network (CDN) is a system of computers containing copies of data, placed at various points in a network so as to maximize bandwidth for access to the data from clients throughout the network. A client accesses a copy of the data near to the client, as opposed to all clients accessing the same central server, so as to avoid bottlenecks near that server.

Content types include web objects, download-able objects (media files, software, documents), applications, real time media streams, and other components of internet delivery (DNS, routes, and database queries).

For a developer, it doesn’t need to copy javascript libraries everywhere. Just a link to CDN, except for modifying the resources. So instead of using:

  • $ <script src=”local_repository/jquery-1.4.4.min.js” language=”javascript” type=”text/javascript”></script>
  • using:

  • $ <script src=”http://code.jquery.com/jquery-1.4.4.min.js” language=”javascript” type=”text/javascript”></script>
  • or:

  • $ <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js“></script>
  • This makes coding easier.

    jQuery official site: CDN Hosted jQuery gives more detail.

    Not only jQuery, Google Libraries API website stores many javascript libraries (Prototype, Dojo, YUI) for online access:
    Google Libraries API – Developer’s Guide