Question

I am working on HTML 5 offline application. When i run that application on visual studio it works fine but when i stop my application then refresh my page it would fire Manifest error event but my application works fine from local cache. but when the same application i hosted on IIS 7.5 it works fine until i stop the server. When i stop the server than refresh my page it would generate obsolete event and cache is deleted. Now i m stuck what to do. I also added MIME type .appcache and type text/cache-manifest

Was it helpful?

Solution

My guess would be that because your browser is technically online (the server is down/offline) it is treating the failure to retrieve the manifest as an error.

And as such it is triggering the obsolete event and deleting the current application cache as per the spec (look at the "Dispatched when..." column for the obsolete event)

So, the appcache is probably working -- or if not, this is not the reason -- this is symptom of your testing being flawed.

Btw, I did the exact same thing - it's annoying not being able to test how your application will fair until in a production/external environment. So be prepared to push your app and realise you missed a resource from the manifest! :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top