Writing an application to work offline (Web application)

When writing an application to work offline and online is it best to write it once to work offline and the online mode will work the same as offline?

For example lets see we have a typical shopping cart example. A shopping cart contains items and a customer.

When the shopping cart is loaded, should I cache all the items + customers in local storage and use that data cache for both online and offline and update the cache as needed? What are some best practices when developing an offline/online hybrid web application?

8
задан cdeszaq 18 December 2013 в 16:26
поделиться