atomsite.net

The AtomPub server for .NET

CDN for Assets

Posted in Technical, Features by JarrettV on 9/21/2009 1:06:14 PM - CST

AtomSite supports content delivery networks for improving the performance of asset downloads.  A CDN allows you to spread the assets your site needs across multiple servers.  Web browsers can download the site faster because it can make multiple calls when assets are separate domains.

Adding New CDN Locations in AtomSite

You can add CDN locations in AtomSite by adding a <cdn> element in the service.config <service> element.  For example:

<svc:cdn>
  <svc:asset name="jquery.tools-1.1.1.min.js" url="http://cdn.jquerytools.org/1.1.1/tiny/jquery.tools.min.js"/>
</svc:cdn>

If there are multiple locations for the same asset, AtomSite will always use the first location.

Default CDN Locations

The default CDN locations in AtomSite (for version 1.3) are shown below.

<cdn xmlns="http://atomsite.net/info/Service">
  <!-- These are the default CDN asset locations, when multiple, always uses first one -->
  <!-- These locations can be overridden in the <service> element of the service.config -->
  <asset name="reset-fonts-grids-2.7.0.css" url="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css"/>
  <asset name="jquery-1.3.2.min.js" url="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"/>
  <asset name="jquery-1.3.2.min.js" url="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js"/>
  <asset name="jquery.tools-1.1.1.min.js" url="http://cdn.jquerytools.org/1.1.1/tiny/jquery.tools.min.js"/>
</cdn>
© Copyright 2010 Powered by AtomSite 1.4.0.0