Search code examples
web-applicationsindexeddbhtml5-appcache

I don't know what to use for my offline application Application Cache or IndexedDB


I'm developing a web application, it's about news, I get news from server as JSON and I do show them as a stream on my application, everything is working fine.

after I want to make my application work offline, I don't know what really I can use knowing that my application will have to sync if we have any new version.

Can I do that with only the Application cache ? or I should use IndexedDB ?

Thanks for your help


Solution

  • Appcache intended usage is for caching static files, so if your use case is caching only website data generated on the server side you can use app cache.

    However if your scenario involves user modified data then you would have to use some of the client storage technologies such as web storage or indexeddb.