Frage

I have a webapp that works offline. I would like to set an expiration date to the cache so if the user does not reconnect to the server for a certain amount of time the cache is cleared and the user cannot use the application anymore.

I think the timer part is easy but I cannot find any way to delete programmatically the cache when I'm offline. I had found the way only when I'm online

War es hilfreich?

Lösung

There is currently no way to programmatically delete the appcache, you have to respond to a request for the manifest with a 404. There is some interest at the W3C in extending the current offline capabilities, you might consider getting your use case added to the list.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top