Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I have been trying to get my site so that it will run offline by using a cache manifest file in asp.net, but cannot get it to work. I am using Visual Studio 2010 with asp.net and javascript.

First, I created a file "cache.manifest" in the main project directory which looks like this:

VB
CACHE MANIFEST

CACHE:
http://mysite.com/dvams/Images/1.jpg
http://mysite.com/dvams/Images/2.jpg
http://mysite.com/dvams/Images/3.jpg
http://mysite.com/dvams/Images/4.jpg
http://mysite.com/dvams/Images/5.jpg
http://mysite.com/dvams/Images/6.jpg

NETWORK:
*

FALLBACK:
/online offline.html


Next I added the following reference to the "system.webServer" section of my web.config file.

XML
<staticContent>
    <mimeMap fileExtension=".manifest" mimeType="text/cache-manifest" />
</staticContent>


All the code samples and instructions I've seen then say to add the attribute "manifest" to the html element in the .aspx page, however when I do this it does not seem to recognise the manifest element.

When I add the manifest element to the header like so:
<html xmlns="http://www.w3.org/1999/xhtml" manifest="cache.manifest">

I get the error:

Warning 89 Validation (XHTML 1.0 Transitional): Attribute 'manifest' is not a valid attribute of element 'html'.

I have searched high and low for an explanation of how to get this working, but I cannot find anything explaining this problem and how to fix it. Some help would be greatly appreciated.
Posted
Comments
Emad Al Hawary 1-Jun-14 14:44pm    
check this http://www.w3schools.com/html/html5_app_cache.asp
Emad Al Hawary 1-Jun-14 14:50pm    
Also, this link


http://www.html5rocks.com/en/tutorials/appcache/beginner/#toc-references
pdbarrows 1-Jun-14 16:24pm    
Thanks. But I saw these already, and neither address the problem of the manifest attribute of the HTML element not being recognised.

Thanks! It was a HTML version issue, as detailed in your first link. I didn't realise HTML 5.0 was brand new and not fully supported yet. My development environment needs a patch to make it compatible.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900