The 2009 Q3 Service Pack 1 landed in your accounts just minutes ago and it holds a great surprise.
Starting with this release you’ll be able to load the control scripts and skins from the Telerik CDN.
You can deploy your applications with CDN support free of charge. That’s right - we cover all hosting expenses for the CDN.
The Telerik CDN is hosted on the Amazon CloudFront service. This is a global content delivery service with edge locations in the US, Europe and Asia.
Coming soon to a cloud near you
Using the Content Delivery Network has a number advantages:
Caching is what a CDN is all about. Say you have a number of applications that all utilize RadGrid. A customer will load the RadGrid scripts just once and then use the cached version until he clears his browser’s cache. Proxies will also aggressively cache these resources.
The resources on the CDN will be served in a gzip-compressed form for all browsers that support it.
You shouldn’t just always use a CDN. Intranet applications in particular are a bad candidate for it. Your Intranet is likely to be a lot faster than any type of CDN. You’ll also lose the ability to run your application without an Internet connection.
You can’t use CDN with interim releases such as internal builds. We’ll upload and maintain files on the CDN only for official releases.
Now to the sweet details. The first requirement is to have both RadScriptManager and RadStyleSheetManager on your page. You can then enable the CDN support globally from the web.config file:
<appSettings> <add key="Telerik.ScriptManager.TelerikCdn" value="Enabled" /> <add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled" /> </appSettings>
You can control the setting on per-instance basis as well:
<telerik:RadScriptManager runat="server" ID="RadScriptManager1"> <CdnSettings TelerikCdn="Enabled" /> </telerik:RadScriptManager> <telerik:RadStyleSheetManager runat="server" ID="RadStyleSheetManager1"> <CdnSettings TelerikCdn="Enabled" /> </telerik:RadStyleSheetManager>
The Telerik CDN uses the following host names:
When a SSL connection is used RadScriptManager and RadStyleSheetManager will fallback to the Amazon S3 service which uses the following hosts:
Make sure that your visitors have unlimited access to these hosts before enabling the CDN support.
Microsoft hosts the MS AJAX framework and other ASP.NET scripts on their very own CDN. Using it will further improve the performance of your .NET 3.5 and 4.0 applications. Please, see the recommended settings and notes below.
ASP.NET 4.0 in particular allows you to load everything (including legacy ASP.NET scripts) from their CDN. Please, see this blog post on InfinitiesLoop for more information.
The Telerik resources will be loaded from the CDN, MS AJAX will be served by RadScriptManager.
<telerik:RadScriptManager runat="server" ID="RadScriptManager1"> <CdnSettings TelerikCdn="Enabled" /> <Scripts> <asp:ScriptReference Assembly="System.Web.Extensions, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Name="MicrosoftAjax.js" Path="http://ajax.microsoft.com/ajax/3.5/MicrosoftAjax.js" /> </Scripts> </telerik:RadScriptManager>
Both MS AJAX scripts and Telerik resources will be served from the respective CDNs.
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" EnableCdn="true" EnableScriptCombine="false"> <CdnSettings TelerikCdn="Enabled" /> </telerik:RadScriptManager> <telerik:RadStyleSheetManager runat="server" ID="RadStyleSheetManager1"> <CdnSettings TelerikCdn="Enabled" /> </telerik:RadStyleSheetManager>
All ASP.NET scripts and Telerik resources are served from the respective CDNs. Note that we need to disable the script combining in this case in order to serve MS AJAX from the Microsoft CDN. This will be fixed in time for the official .NET 4.0 release.
We’ve updated our WebMail demo to use the Telerik CDN as a demonstration. Please, feel free to give it a try.
Please, consult the online help for more details:
RadScriptManager CDN Support
RadStyleSheetManager CDN Support
Your feedback is welcome :)
Iana Tsolova is Product Manager at Telerik’s DevTools division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.