title: Writing an application to work offline (Web application)
body: <p>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?</p>
  
  <p>For example lets see we have a typical shopping cart example. A shopping cart contains items and a customer.</p>
  
  <p>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?</p>