You need to consider where offline data is stored: In localStorage or a database, for example IndexedDB or PouchDB?
Another consideration is how much data will the application store on a device? The business functionality included in an application will determine data volume. Consider the practicality of storing gigabytes of data.
You also need to decide the appropriate format for offline data. Are key and value pairs adequate? Will the application require indexes for query optimisation?
localStorage:
o Operates synchronously; i.e. the application blocks the user while it retrieves the data.
o Capacity is approximately 5MB
o No built-in security
o Inappropriate for storing user credentials
Databases can be larger than localStorage.
IndexedDB:
o Key, value pairs
o Understands transactions
o Asynchronous via a call back function
o No size limit; browsers may impose a limit or clear data when space is low
PouchDB:
o Builds on IndexedDB
o Includes synchronisation options