Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does clearing internet cache/cookies on browser clear localstorage/websql?

I am looking at making a javascript app which is primarily reliant upon browser localstorage or websql (not sure which to target yet), however I was wondering if I were to save the users application data within there, will it be cleared if they clear cache or cookies?

My main deployment platform at the moment would be smart phones using phonegap.

like image 682
Grofit Avatar asked Sep 01 '25 22:09

Grofit


2 Answers

Clearing cookies will clear the storage. Clearing cache will not affect your storage.

like image 165
praddyB Avatar answered Sep 03 '25 15:09

praddyB


Your localStorage will stick around no matter what, it belongs to the app.

It will only go away if the user deletes the app. I'm not totally sure if this is the same for web apps as those do rely on the mobile browser in which case the localStorage belongs to that app.

like image 20
Drew Dahlman Avatar answered Sep 03 '25 13:09

Drew Dahlman