cordova-docs icon indicating copy to clipboard operation
cordova-docs copied to clipboard

Please updated the documentation on iOS's local storage is a little unclear.

Open Ajay-jain11 opened this issue 1 year ago • 2 comments

The updated documentation on iOS's local storage is a little unclear.

"iOS stores localStorage data in a location that may be cleaned out by the OS when space is required."

OS should never erase local storage—that is, webkit's responsibility—at least not during runtime.

Please see the details here https://webkit.org/blog/10218/full-third-party-cookie-blocking-and-more/

Ajay-jain11 avatar Oct 12 '24 06:10 Ajay-jain11

I had a look at a plugin that I used to migrate local storage and the paths for the UIWebView the local storage was potentially stored in the caches folder, which was something that the OS will clear when it feels like it needs to reclaim disk space.

But it looks like WKWebview uses a non-cache folder so the docs might be representing what was accurate for UIWebView but maybe not as much for WKWebView.

OS should never erase local storage—that is, webkit's responsibility—at least not during runtime.

I believe the user can still request app data to be deleted, which will include the webview's local storage data.

Can you provide a link of what parts of the cordova documentation states that local storage can be cleared by the OS?

breautek avatar Oct 17 '24 19:10 breautek

Here is the link https://cordova.apache.org/docs/en/12.x/cordova/storage/storage.html

Ajay-jain11 avatar Oct 18 '24 17:10 Ajay-jain11

The updated documentation on iOS's local storage is a little unclear.

"iOS stores localStorage data in a location that may be cleaned out by the OS when space is required."

OS should never erase local storage—that is, webkit's responsibility—at least not during runtime.

Please see the details here https://webkit.org/blog/10218/full-third-party-cookie-blocking-and-more/

can you clear out the issue again i was looking forward to wok on it could you explain it once please

RSzipper avatar Feb 19 '25 06:02 RSzipper