Image cache reduces client-server requests for images.Image cache is useful for fast retrieval of images. we can store server side images in application using image cache and retrieve any time when we want even if server connected or not.
Questions tagged [image-caching]
222 questions
154
votes
20 answers
How to force a web browser NOT to cache images
Background
I am writing and using a very simple CGI-based (Perl) content management tool for two pro-bono websites. It provides the website administrator with HTML forms for events where they fill the fields (date, place, title, description, links,…

Philibert Perusse
- 4,026
- 5
- 24
- 26
71
votes
14 answers
Is there a way to force browsers to refresh/download images?
I have a problem where users are reporting that their images aren't being uploaded and the old ones are still there. On closer inspection the new images are there, they just have the same name as the old one. What I do on the upload is that I rename…

uriDium
- 13,110
- 20
- 78
- 138
58
votes
11 answers
Saving image and then loading it in Swift (iOS)
I am saving an image using saveImage.
func saveImage (image: UIImage, path: String ) -> Bool{
let pngImageData = UIImagePNGRepresentation(image)
//let jpgImageData = UIImageJPEGRepresentation(image, 1.0) // if you want to save as JPEG
…

tesgoe
- 1,012
- 3
- 10
- 19
47
votes
4 answers
How to make static content on Apache be cached by browser and not checked for freshness with every request?
How can I get static content on Apache to be {cached by browser} and not {checked for freshness {with every request}}?
I'm working on a website hosted on Apache webserver. Recently, I was testing something with headers (Content-Type for different…

Piskvor left the building
- 91,498
- 46
- 177
- 222
32
votes
2 answers
Glide : How to find if the image is already cached and use the cached version?
Scenario:
I have a large GIF image which I want to cache the first time user opens the app using Glide - Image Loading and Caching library. After that whenever user opens the app, I want to show the cached version if present. This GIF URL will…

Shobhit Puri
- 25,769
- 11
- 95
- 124
23
votes
6 answers
SDWebImage and setting custom HTTP headers?
I´ve just changed my code for caching images away from EGOImageCache to SDWebView. Unfortunately i don´t know how to set custom HTTP headers as i have to send authentification to be able to fetch images. It was easy done with EGOImageCache as i´ve…

rockstarberlin
- 1,853
- 1
- 18
- 31
17
votes
8 answers
Android java.lang.OutOfMemoryError?
04-25 08:19:10.111 2431-2603/com.example.francesco.guidedautorewithtabs E/art﹕ Throwing OutOfMemoryError "Failed to allocate a 4194316 byte allocation with 1983651 free bytes and 1937KB until OOM"
04-25 08:19:10.114 …

Francesco Lombardo
- 335
- 1
- 4
- 15
15
votes
4 answers
How to run cached Docker image in Github Action?
I don't know how to run a cached Docker image in Github Actions.
I've followed a tutorial about Publishing Docker images to implement a task that would cache, build and push Docker image to a DockerHub.
I need to build, cache and run the image, the…

Ivan Vnucec
- 604
- 1
- 5
- 17
13
votes
4 answers
How to cache images using URLSession in Swift
I would like to enhance the code below to cache images and only download them if they haven't been cached previously. I can't seem to find any good examples of how to use URLSession object to do this.
extension UIImageView {
func…

Martin Muldoon
- 3,388
- 4
- 24
- 55
12
votes
5 answers
Android - How to get image file from Fresco disk cache?
I am using the Fresco library.
I can't find any related info in the Fresco documentation,
how can I get an image file from Fresco's disk cache?

dreambit.io dreambitio
- 1,892
- 1
- 15
- 24
11
votes
3 answers
How to cache images only in disk using Kingfisher?
I am using Kingfisher library for downloading and caching images. I am facing some issues in the implementation:
Are the images cached in both memory and disk?
Is there any provision to cache images only on disk?
I have already read multiple posts…

PGDev
- 23,751
- 6
- 34
- 88
11
votes
3 answers
Android Glide: How to download and cache bitmaps?
I am using Glide to download and cache images on Android. Everything works well except the fact that I don't want to load the bitmaps directly into the ImageView, I don't want to have the fade animation, neither image placeholders.
All I want is to…

Zbarcea Christian
- 9,367
- 22
- 84
- 137
11
votes
5 answers
Cache URL images iphone UITableview
I'm seeking a tutorial on how to cache images loaded from a url into cells of a uitableview.
I found an example here
http://www.ericd.net/2009/05/iphone-caching-images-in-memory.html#top
But the code is incomplete. I'm an objective c novice so I…

dubbeat
- 7,706
- 18
- 70
- 122
10
votes
1 answer
How to set iOS cache and disk storage size and how does cache get restored from disk storage after app termination?
I've already asked When exactly do things get removed from urlcache's memory and disk?
Now I have some more follow up questions:
The memory cache is restricted by the iPhone's ram (usually 2Gb). But the disk Persistence is limited by 64Gb or…

mfaani
- 33,269
- 19
- 164
- 293
9
votes
5 answers
Where to cache remote image files in iOS?
I am planning to cache the images from a server and use show it as a sort slide show in my App. I would be asynchronously loading the images.
I have two options:
Either to cache the images as a File and use it whenever necessary.
Cache the images…

RK-
- 12,099
- 23
- 89
- 155