This is a migrated thread and some comments may be shown as answers.

[Solved] Custom CDN for scripts and stylesheets

0 Answers 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Werner
Top achievements
Rank 1
Werner asked on 17 Oct 2011, 10:04 AM
Hello,

We'd like to use our own CDN for storing stylesheets and javascripts. For example, suppose register the stylesheet "~/Content/screen.css" with the StylesheetRegistrar. When the application starts up, I'd to specify to replace "~" with the CDN I provide (say http://cdn.example.com/a/b/c where a, b and c are arbitrary folders). The result should be "http://cdn.example.com/a/b/c/Content/screen.css" rather than resolving relative to the existing website.  I'd also like all the telerik css and javascript to be loaded in a similar way. 

The aim is essentially to consolidate all the assets of several web applications such that they are referenced from a CDN. However, I do not want to manually configure each script and stylesheet.  I'd rather specify the base url once per application.

Is this possible? If not, how can I achieve this? 

Thanks,
Werner
Tags
General Discussions
Asked by
Werner
Top achievements
Rank 1
Share this question
or