Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 659805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:05:10+00:00 2026-05-13T23:05:10+00:00

I have a UITableView whose cells contain custom ImageViews that asynchronously load the images

  • 0

I have a UITableView whose cells contain custom ImageViews that asynchronously load the images from the internet. To load those images I use NSURLRequest and NSURLConnection which works fine. The only problem is that the images are not cached and therefore are downloaded every time they are used. I tried to set the cachePolicy of the NSURLRequest to “NSURLRequestReturnCacheDataElseLoad” with no effect.

It seems from the last answer on link that disk caching is not supported with NSURLRequest on the iPhone. Is this correct?

If it should actually work, I’d be interested to know what could be the reason that it doesn’t work in my case.

Here’s the code:

NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://myurl"] cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:60.0];


connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:05:10+00:00Added an answer on May 13, 2026 at 11:05 pm

    I think it should work. If it does not then it could mean that the web server is actually serving content that is not cacheable. For example because it is not setting the right headers.

    If you can post a link to one of the images then we can take a close look.

    HTTP/1.1 200 OK
    Date: Mon, 01 Mar 2010 12:40:46 GMT
    Server: Apache
    Last-Modified: Mon, 01 Mar 2010 09:33:29 GMT
    ETag: "25e8dd2-11a6-480b9f1178c40"
    Accept-Ranges: bytes
    Content-Length: 4518
    Keep-Alive: timeout=15, max=100
    Connection: Keep-Alive
    Content-Type: image/png
    

    This is what one of your images returns as headers. I don’t see a Expires or Cache-Control header, so that may be why they are not cached. I think as far as WebKit is concerned, this is dynamic content that should be reloaded every time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have UITableView with images as rows (cells). I use EGOImageView to load images
I have a UITableView whose cells contain UITableViews that are rotated 90° (so they
I have a UITableView that lists comments from various users. I save all of
Short Explanation Currently I have a UITableView which contains cells of videos from a
I need some help. I have a UITableView that has cells that hold the
In my app, I have a UITableView which has some custom cells and in
I have a UITableView that uses a variety of custom UITableViewCells . I'd like
I have a UITableView whose cells have dynamic height. What I want to do
Following the documentation on custom cells from a NIB (the Dynamic option), I have
I have a uitableview with cells whose behavior depends on what: - (UITableViewCell *)tableView:(UITableView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.