What should I use for store data client-side so that datas wouldn't be deleted when clearing browsers history? Is there any way to do that?
Asked
Active
Viewed 120 times
2
-
What you *should* do is have the client log in and store the data on the server. – Andrew Morton Dec 01 '16 at 20:49
2 Answers
0
Clearing the browser's history does just that. It doesn't clear cookies or local storage. But localStorage
is probably your best bet if you meant clearing cookies as localStorage
is not cleared by clearing cookies. See this for more.

Scott Marcus
- 64,069
- 6
- 49
- 71
-
Thank You for your answer, unfortunelly I read that localStorage is deleted when browsers history got deleted. Here is the link to that post: http://stackoverflow.com/questions/26512449/does-localstorage-in-javascript-get-wiped-off-after-clearing-browser-history – daniel1234567 Dec 01 '16 at 21:17
-
That post is misleading. When clearing the browser's history, just the history is cleared. However, often when clear history is clicked, the option to clear other resources is also offered and if the user has those other resources checked, then yes, those other resources will be cleared. – Scott Marcus Dec 01 '16 at 21:25
0
Actually Indexed DB is the standard browser-side storage approach which doesn't get dropped when user clears browser's history.
See these related Q&As:
- No way to delete IndexedDB under Google Chrome
- How do you delete the indexed databases stored on your computer in Firefox?
This still true for major browsers for now. Maybe I'll need to retract this answer in a while...

Community
- 1
- 1

Matías Fidemraizer
- 63,804
- 18
- 124
- 206
-
-
@daniel1234567 No problem! IndexedDB is a very interesting technology. – Matías Fidemraizer Dec 01 '16 at 21:21
-
Fidemraizer Could you help me choose wrapper library so indexeddb would work on mobile devices? I want a light library only for this task(nothing fancy and complex like new commands and so on). – daniel1234567 Dec 02 '16 at 16:20
-