Is there any possible solution to "protect" the webview cache from the "Clear Cache" option in the default web browser. Any time I clear the cache completely I lose my app data, I'd like to preserve it.
1 Answer
Is there any possible solution to "protect" the webview cache from the "Clear Cache" option
No. That runs foul on the principal of "users over authors". That means the user controls their data, and not the authors of the web app. If the user wants to delete the data, then its gone. See the W3C's HTML Design Principals, Priority of Constituencies.
I think this is going to be a problem when (1) WebCrypto goes live because it means provisioning information, like keys and certificates provisioned by a bank or organization, and can deleted at any time; and (2) the document you created and edited with your word processor offline web app was accidentally deleted.
For (1), I think WebCrypto intended to try and solve it with some storage specification. But I think they found it was too difficult and offloaded it to another working group (web storage).
(2) is kind of solved with "cloud storage", but that moves data out of your control and into someone else's control. Its not just Apple back dooring their products...