ionic-cache-src icon indicating copy to clipboard operation
ionic-cache-src copied to clipboard

Clear all cached image

Open amirreza-one opened this issue 9 years ago • 3 comments

I want to know is there anyway to clear all images that are cached?

amirreza-one avatar Apr 26 '16 04:04 amirreza-one

Any solution to this?

I have a problem that the images on the server change and I always get the cached version. So it would be great to delete the cached version.

henningtillmann avatar Sep 07 '16 10:09 henningtillmann

@henningtillmann you can use this attribute expire="{{60}}" it tells the directive to delete the cached image after 60 seconds and re-download new one, otherwise if the image's URL does not change you can use something like this http://URL-to-image/image.jpg?956523345 <-- add a random numbers at the end of image's URL to force directive to download new image every time the page reloaded.

@amirreza-one there is a way to delete all the cache manually use this delete $localStorage.cache_src to clear all the cache stored in localstorage.

Rakonda avatar Nov 27 '16 23:11 Rakonda

I am searching for the solution too did you find one?

Awais-mohammad avatar Aug 19 '20 05:08 Awais-mohammad