ionic-cache-src
ionic-cache-src copied to clipboard
Clear all cached image
I want to know is there anyway to clear all images that are cached?
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 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.
I am searching for the solution too did you find one?