paveisistemas / ionic-image-lazy-load

Directive to Ionic Framework that only loads an image when it is seen by the user.
http://codepen.io/pavei/pen/oFpCy
MIT License
366 stars 117 forks source link

Does ionic-image-lazy-load have any caching like ng-src does? #19

Open 5amfung opened 9 years ago

5amfung commented 9 years ago

A quick look at the code doesn't seem like there's any caching. Is my understanding correct?

Thanks.

bmcharg commented 9 years ago

I'll second this. Not having caching in is a dealbreaker for me, as the ux of moving in and out of a view is poor as all the previously loaded images reload. Are there any plans to add caching?

kjakub commented 9 years ago

Ionic has caching of views by itself. Or what caching are you talking about ?

bmcharg commented 9 years ago

My view caching comment was misleading, as the view I was testing on was a detail page and caching was prevented by Ionic's default setting of no forward cache.

It would, however, be better if any downloaded images were cached locally for subsequent requests rather than being requested from the server each time (eg on another view / after the view cache has been flushed)

kjakub commented 9 years ago

I got it. In any case I think i am not going to use this piece of code, since i see that performance of the list is actually worst than before and when there is only one element in list, the image never get loaded.

Brad19 commented 7 years ago

@bmcharg @kjakub I'm thinking to use this. But at the moment i'm facing this same caching issue where src doesn't show when you navigate back to the same screen. If you or any one have any updates or other better solution, pls advise

Thanks, Brad