Monday, January 25, 2010

An introduction to ASP.NET Ajax 4: The CDN

Microsoft is providing a free content delivery network hosting ASP.NET Ajax and jQuery. Next to these scripts, they are also hosting some stylesheets which play together nicely with the Client Controls.

Define

Here is a definition I found on Wikipedia.
A content delivery network 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 bottleneck near that server.

Improving performance

Using the CDN will improve the performance of your webapplication in several ways:
  • The number of networkhops gets reduced.
  • Browsers can reuse cached JavaScript files for webapplications that are located in different domains.
  • The load on your own webserver gets smaller.

How to use

If you use the Scriptloader you only need to reference to one script on the CDN. It will automatically download the other scripts from the CDN.

   1:  <script type="text/javascript" src="http://ajax.microsoft.com/ajax/beta/0911/Start.debug.js"></script>  

Click here for the full CDN directory listing.

More facts and pretty graphs

As I mentioned in this post, this free e-book shows you how ASP.NET Ajax 4 can make your webapplications faster. There's a whole chapter on the CDN in there.

No comments:

Post a Comment