0

I have created PWA application. As my requirement says, my PWA application should work for both online and offline as of now online i have done but facing problem with offline because i should not use service worker or any browser level storage. I need to use some local database i have chosen sqlite but not getting proper documentation to connect PWA app with sqlite.

Thanks in advance.

  • PWA's cache API calls, should you not rather look at using Mongodb? If this is not what you are trying to do could you be a bit more descriptive on your implementation? Maybe add an example? – salomonvh Mar 01 '21 at 10:17
  • Actually i am developing PWA app for both Device and Mobile, i want to use my application when there is no internet also. In first page i have 2 buttons Employee login and external login when i click on external login it will navigate to Azure B2C Login page at that time we need to have internet connection because azure wont work without internet after that i will store access token in some local DB and when there is no internet also i can navigate to home page without logging in again based on access token. – Deepashree Kannoor Mar 03 '21 at 05:29
  • I am still a bit confused. Your app should function as is without the need to login to Azure. Once the internet connection returns your app should make the connection and get the new access token. No need for it to be stored otherwise. This means you will require two access tokens (depending on your authentication method), one for your App at login(to the app) and one for Azure when the internet connection is available. – salomonvh Mar 08 '21 at 13:05

1 Answers1

0

Possible duplicate of SQLite database in PWA app.

I was looking the same thing for developing Blazor PWA, but since the PWA is basically a web content and runs on browser, there is no way to access local file directly. Even WebAssembly won't help as it has security concern. But if you did, the database files will be easily erased when the browser clears the cache or temporary files because the browser designed that way.

yosi madsu
  • 154
  • 8