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:
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.
<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.