public ActionResult Manifest()
{
var pages = new List<string> {"/", "/cache"};
var scriptsPaths = GetRelativePathsToRoot("~/Scripts/");
var contentPaths = GetRelativePathsToRoot("~/Content/");
var cacheResources = new List<string>();
cacheResources.AddRange(pages);
cacheResources.AddRange(contentPaths);
cacheResources.AddRange(scriptsPaths);
var manifestResult = new ManifestResult("1.1")
{
NetworkResources = new [] { "*", "/api/articles", "/readability" },
CacheResources = cacheResources,
FallbackResources = new Dictionary<string, string>
{
{ "/", Url.Action("Fallback", "App") },
{ "/Modes/Online.js", "/Modes/Offline.js" }
},
ExprirationToken = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")
};
return manifestResult;
}