Reputation: 490
We're doing a web app using the DOMApplicationCache / cache manifest, and I'm wondering if Mobile Safari at any point will clean/clear the DOMApplicationCache for my project (eg. if the website is not visited in a certain amount of time).
I'm also told, that saving the web app to the home screen will sandbox its application cache, effectively avoiding any time constraints there might be on the DOMApplicationCache in "normal" Mobile Safari.
So do anybody know what the current situation is on this? Or would you maybe be able to point me to a relevant resource?
Thanks!
Upvotes: 0
Views: 358
Reputation: 2289
It doesn't seem like it should be clearing the cache automatically, from what I can read in Apple's document about storing web content on the client: https://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/Client-SideStorage/Client-SideStorage.html#//apple_ref/doc/uid/TP40002051-CH4-SW5
However, I would probably implement a measure to ensure that the cache is valid and exists using the status property of the applicationCache object. If you haven't already, check the class reference here: https://developer.apple.com/library/safari/#documentation/DataManagement/Reference/DOMApplicationCacheClassReference/DOMApplicationCache/DOMApplicationCache.html#//apple_ref/javascript/cl/DOMApplicationCache
Upvotes: 1