I am facing a problem in image caching. I can not get a new image. Because I use the same URL to get the image. But on the server side, my administrator changed the images at this URL location.
I know that there is one way to check if it is new or old based on the status code or cache controller.
Here's my question: is there a way to get the URL status code without downloading content?
Step1: The image from the online address was uploaded successfully. using the following method
(void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage; This is successfully display on my image view and cached. Step 2: I changed image from server. Url is same. So I can not able to get latest image. I am always getting old image.
Question: How to get the last image from the server using the UIImageView + AFNetworking category with the same URL?
Note. I successfully get the status code from the server (304 or 200). So how can I handle it?
source
share