Which is the best backend database of PWA | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Which is the best backend database of PWA

I want to convert mysql and php website into progressive web app (PWA). So is it possible to cache database like the other static files.

3rd Jun 2021, 11:43 AM
Moh'edfanah
Moh'edfanah - avatar
2 Answers
+ 13
No one caches a whole database on a user's device. Databases usually store gigabytes of data 🙂 PWA apps usually work like this: 1. A user opens the app and goes to some catalog (or to whatever information you provide) 2. The app fetches some catalog data from a server, caches it and renders it. 3. The user closes the app and turns of his Internet connection. 4. The user opens the app and goes to the catalog. 5. The app tries to fetch the catalog data from the server and fails. Then it takes the data from the cache and renders it.
3rd Jun 2021, 3:34 PM
Igor Makarsky
Igor Makarsky - avatar
+ 1
Igor Makarsky thanks. So it means pwa doesn't need to cache database even in small bit of it. It only needs static files like css , javascript and html
3rd Jun 2021, 3:49 PM
Moh'edfanah
Moh'edfanah - avatar