luckyllama/LuckyAssetManager — Issue #2: Have Fallback Option with Alternate Paths
Author: luckyllama
Created: 2012-02-25 04:14:22+00:00
State: open
Labels: Feature Request

When an alternate path is specified (usually a CDN version of a file), it would be nice to have the AssetManager generate some fallback code to check that the file was loaded and load the default (local) file if not. This would prevent a CDN outage from breaking the site.

It could look something like this:

```
<%
Assets.Javascript("~/Scripts/jquery-1.5.1.js")
.WithAlternatePath("cdn", "http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.js")
.WithBackup(checkFor: "jQuery")
.Add()
%>
```

which would produce

```html

```