Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 22, 2012 08:07 PM by cgann3k
Aug 22, 2011 03:10 PM|LINK
I read this blog:
My problem is the section "Creating a Manifest File in an ASP.NET Application". How can I do that with Razor WEB-Pages?
Aug 22, 2011 04:40 PM|LINK
Response.ContentType = "text/cache-manifest";
Aug 22, 2011 05:07 PM|LINK
Thanks Mike for your answer!
I changed "Default.cshtml". After that, starts the download of the "Manifest.txt" and
a blank site ("about:Blank") is shown. What can I do?
Aug 22, 2011 05:51 PM|LINK
You should have saved the code I posted as manifest.cshtml, and then referenced it in your default.cshtml by amending the <html> tag as follows:
Aug 22, 2011 06:32 PM|LINK
OK, I think this should work now. But I don't how I can test it? I'm using IIS Express and Google Chrome.
Aug 22, 2011 07:00 PM|LINK
Firefox 6.0 asks you if you want to allow the site to use offline storage.
Aug 22, 2011 10:22 PM|LINK
The "manifest" file may not contain files like "_SiteLayout.cshtml". Accidentally I included every "*.cshtml"
into the "manifest" file. That was my last problem. Now everything works fine. Thanks Mike!
You are awesome! By the way, does IE10 support the HTML5 Offline Web Application standard?
Aug 23, 2011 07:19 AM|LINK
I don't know for certain, but it would be a bit mental for MS to hype HTML5 all over the place and then NOT to fully implement it in their next browser.
Mar 22, 2012 08:07 PM|LINK
So Mike (really enjoy your blog, btw), how would this work if you query a database in your *.cshtml files? Would the result set be cached? Should you query the db and save a local JSON file and reference that in the manifest? Does webmatrix have the ability
to save a recordset as a JSON file? I Found your blog post on using the JSON helper [http://www.mikesdotnetting.com/Article/160/WebMatrix-Working-With-The-JSON-Helper]
but I'm still fuzzy on how you'd cache the JSON object for use offline.
Thanks in advance!