Warm tip: This article is reproduced from stackoverflow.com, please click
cookies local-storage progressive-web-apps

How would I go about storing data for specific 'user' without accounts (cookie?)?

发布于 2020-04-11 11:47:48

Basically the idea is to make an app which stores 'times' for Rubik's Cube solves (as qqtimer.net). Also wanted to make it a PWA. As I'm new to web development, I'm not quite sure how to go about storing those solves since the app wouldn't require user accounts (logging in). Simply open the app in the browser, use it, and it keeps the data as long as we don't clear cookies/cache(?). I read about cookies/local storage(indexedDB?) to try and figure out how to go about it but I'm not quite sure. The idea is that the data should exist for a 'user' in a browser. Also there's no need to have the solves that I do on browser appear on the phone or vice-versa (pwa just to be able to use on phone) even though I would like to know if that's possible (maybe using google account?).
Ultimately, what I want is to know what I should use/look into (cookies, database, local storage, etc..).
Thanks in advance

Questioner
João Bordalo
Viewed
60
João Bordalo 2020-02-02 05:33

Used indexedDB for storing locally in the browser