Cordova / Phonegap downloading a lot of images, be

2019-08-14 13:50发布

I need some advice. I have Phonegap / Cordova content app created using Ionic Framework. This app is supose to work both offline and online.

So far I managed to implement offline database (SQLite), but I have some trouble with images.

The first strategy I chose was to "install" all the images at the beginning of first start of app (in meanwhile Progress Bar was visible)

It works, but I think that first start of app is simply too slow (it's over 800 images) It takes more than 7 minutes, which is really bad for user experience.

Here are some of my strategies:

  • Download all the images as single ZIP file and extract it into device

  • Download only some part of images (25% ?) and then download rest of them in the background, while user can use his app. Use some kind of images placeholder at some places ?

Which strategy is the best ? Maybe someone has similar experience ?

1条回答
Animai°情兽
2楼-- · 2019-08-14 14:31

image-saver

An Ionic/Angular directive for saving remote images to local file storage. Might be able to help you out. Make sure to follow the readMe.md file.

查看更多
登录 后发表回答