I have an MVC2 web site which I am trying to get working offline on an iPhone. All pages in my site use the same master page, and this references the single cache manifest file. None of the specific MVC urls are present in the manifest file but that is ok for now because they will get cached once they have been visited once (they get cached on initial download).
My problem is this: if I have a url of http://www.mysite.com/red or http://www.mysite.com/blue then the page gets cached on the iphone. If I have a url of http://www.mysite.com/red/one or http://www.mysite.com/blue/two then the page does not get cached.
Does anyone know why this might be happening?
Thanks very much.
The url of the files listed in a cache manifest are all relative to the location of the file that includes the manifest, not the location of the manifest itself.
If your site is structured like:
And your cache.manifest currently looks like
It will work for http://www.mysite.com/red and http://www.mysite.com/blue .
To make that same cache manifest work for http://www.mysite.com/red/one or http://www.mysite.com/blue/two, you should change your manifest to use absolute urls, like this: