How to handle CDN failure for CSS files in ASP.NET 4.5?

204 views Asked by At

ScriptManager in ASP.NET 4.5 (VisualStudio 2013) loads local JavaScript files when they fail to be served from a CDN (jQuery, Bootstrap, etc) via the LoadSuccessExpression property. I am wondering how CSS loading should be handled in such cases.

For example, if a web page tries to load Bootstrap's JavaScript from a CDN and the CDN fails, ScriptManager will serve the local version, which is fine, but what should happen to the Bootstrap's CSS file, since it's also served from the same CDN? Is there a facility in ASP.NET 4.5 that would make it easier? If not, what's the point of using ScriptManager for JavaScript files, when you still need to hard-code handling of CSS files? Any ideas or insights?

0

There are 0 answers