Please give an example how I can integrate HTML code of offline caching in my ASP.Net application?
2 Answers
Set up your cache manifest handler like this
using System.Web;
namespace JavaScriptReference {
public class Manifest : IHttpHandler {
public void ProcessRequest(HttpContext context) {
context.Response.ContentType = "text/cache-manifest";
context.Response.WriteFile(context.Server.MapPath("Manifest.txt"));
}
public bool IsReusable {
get {
return false;
}
}
}
}
and then add your manifest handler in the html5 tag
<html xmlns="http://www.w3.org/1999/xhtml" manifest="Manifest.ashx">