This blog enty is part 2 of my thoughts on offline web applications on mobile devices. In case you haven't seen part 1 and are interested in this topic, you might want to read part 1 first before continuing here.
When allowing web applications to store data offline and to access locally available information a number of issues arise that require special attention:
When storing data both in a local database in the network, the databases have to be synchronized once the mobile device regains network connection. Even for single user applications local and remote database synchronization is not straight forward since the user could have first used the application on the mobile device while it was offline to change some data and later on via the desktop that modified that data in the network. This means that when the mobile devices goes online it can not assume the data base in the network was not modified. Thus, the application needs an algorithm to compare the changes made in the database on the mobile device with the changes made in the database on the network and then modify the local and the network database accordingly. The same applies to multi user applications such as shared calendars.
Access to Local Information Outside the Browser Cache
A big advantage of mobile devices is the ability to support the user’s creativity at the point of inspiration. When pictures, videos, podcasts, blog entries etc. are created on the mobile device they can automatically be enriched with other information such as GPS location before being instantly sent to a picture and video sharing site, blogs, etc. Current web applications, however, do not have access to files and other local data beyond what they can write into the local web database themselves while the device is not connected to the web. In the future it is thus necessary to create an interface for web applications to enable them to access user created content and additional information such as location information. Access to local information needs to be dealt with carefully as it presents a security and privacy issue as will be further discussed below. From the technical point of view the big question is how web applications could gain local access in a generic way to make them interoperable over a wide variety of devices. Some devices might have more sources of information than others. As using proprietary APIs to access such information would make web applications device specific, a standard set of functions must be designed which are then translated on each device into proprietary operating system commands.
Security and Privacy Considerations
Allowing a web application to store data locally or to even access local information beyond the browser cache has a number of security and privacy implications which have to be considered when implementing such functionality.
As always, comments are welcome!