So let me start off by saying I’ve never used a CDN before. The way I understand it working is it basically looks for a file and grabs it if it exists and uses a file local to the server if it doesn’t.
So we’re using Telerik and have many script groups. Example:
@(Html.Telerik().ScriptRegistrar()
.jQuery(false)
.Scripts(scripts =>
scripts.AddGroup("PublicLayoutScripts", group =>
group
.Add("script1.js")
.Add("script2.js")
.Add("script3.js")
.Combined(true)
.Compress(true)
.CacheDurationInDays(0.0416f)//one hour
.ContentDeliveryNetworkUrl("url/to/precompiled/assets/file").
))
)
So we have this script group, Telerik combines/compresses the scripts and creates an asset.axd file and returns the html to reference that file.
My question at this point is, does Telerik have a way of taking defined groups of files, and combining/compressing then outputting the .axd files to the harddrive where they can be uploaded to the CDN.
I’ve googled quite a bit for it and didn’t find much, maybe my key words for it aren’t up to par though. Also, using Telerik’s CDN is not an alternative solution.
Amazon’s cloud service supports a target origin which basically allows the files to be retrieved from your site if they don’t exist on the CDN.