vite-pwa / vite-plugin-pwa

Zero-config PWA for Vite
https://vite-pwa-org.netlify.app/
MIT License
3.23k stars 211 forks source link

Sqlite or database in users phone #719

Closed alesha2911 closed 6 months ago

alesha2911 commented 6 months ago

How can i keep a database in users phone ?. May be sqlite. Only in users phone. Not browers a database.

userquin commented 6 months ago

You can use indexeddb, it is an sqlite database. If the database is complex or can change frequently, check dexie.

You can also check https://sqlite.org/wasm/doc/trunk/about.md.

Jeree-TheOne commented 6 months ago

@userquin using indexeddb where does data stored? if my app installed on a phone does all this data stored in local wrapper browser instance or maybe in global browser scope?

userquin commented 6 months ago

It is stored per host globally, check devtools application tab, search indexed db, you can access db also from service workers and web workers.

Beware with safari and ff: on safari there are some limitations (50mb only) and ff will not work in private browsing.

Jeree-TheOne commented 6 months ago

@userquin okay, got it, thank you!

alesha2911 commented 6 months ago

@userquin thank you, good day )

alesha2911 commented 6 months ago

@userquin https://whatpwacando.today/ . PWA Vite Plugin support current function ?

userquin commented 6 months ago

@alesha2911 what do you mean?

alesha2911 commented 6 months ago

@userquin PWA Vite Plugin support function Authentication, Face detection, Notifications, Geolocation ?