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
Asked
Active
Viewed 642 times
1 Answers
0
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! :)

Sethi
- 1,378
- 8
- 14
-
is there any way to solve this ? if server is down appcache is deleted now no more offline work than what should i do ? – Zeeshan Saleem Oct 09 '13 at 09:12
-
it's not the most convenient solution, but you can (1) set up a virtual machine, then (2) browser to your app, then (3) disconnect the internet connect to the virtual machine, then (4) browse to your app again, this time you are offline. – Sethi Oct 09 '13 at 10:39
-
1Or simply deploy it to a testing environment (e.g. a subdomain of your production environment). I would suggest completing your app before messing about with the cache manifest. **It causes many issues during development like making you think your code doesn't work rather than an old version from the cache being used** – Sethi Oct 09 '13 at 10:42
-
Ok thanks i was thinking the real solution for this well thanks alot for suggesting me this – Zeeshan Saleem Oct 09 '13 at 12:54