Hey guys. I’m trying to make an app which syncs content (tabs/partial pages using Angular route) when offline and loads from the cached files when offline. So i can’t use angular’s cache as it is not permanent, but i need to somehow cache those partial files. Any idea how to do it ? Include what in the manifest, where to declare it, etc.
You can use localstorage, or lawnchair
Local storage seems to be what people have been using, as it’s simple and loads a bit faster.
Yeah well…but that bring up other problems like having to manually sync and replace when connected.
Check out this article.
I guess app cache can work, but it seems a bit finicky.
Hope this helps
Ok i kinda solved this. I used html5 cache. All i needed to do is include the tag in my index.html file on the web server. in my ionic app i only have an index.html which redirects me to my web sever index.html. It seems to cache everything, including the js ionic framework, and all dependencies needed. That’s exactly what i needed, although i will use it only for cache-ing templates directory, i will set js’s to NETWORK* since they won’t change. Now my app is completely independent and i can change pages content from the web server by modifying angular templates . This is awesome : )
This is possible if you publish the app on the App store and Play Store?
Could you please elaborate on this a little bit? I have an open question about this on stackoverflow.