[Solved]-Strategies to make a web application available offline?



  1. To check if the user is offline or online , you can use navigator.onLine but this property is not supported on all browsers. Then, if you target some of this browsers, you will have to implement an other solution with AJAX calls for example.

  2. Concerning the synchronisation, you can use available solution like CouchDB (NoSQL) on your server and use PouchDB (indexedDB) in your javascript front-end that will ease you the synchronisation process. If it doesn’t meet your expectations, implement your own solution, to synchronize an indexedDB with your server database (MySQL, Postgres, MongoDB, etc…), of course, you can still use pouchDB on the front-end.

  3. Regarding performance, I think it will depend greatly on:

    • the number of servers that host your web applications
    • the number of replica of your master database
    • configuration of your servers (CPU and RAM)

Leave a comment