1

I've posted about this before but have been struggling to come up with a solution.

Basically I have a HTML5/jQuery app within my iPad app. Every time I load an image into the UIWebView (HTML App) the overall allocations in the profiler increases by about 2MB each time. This sounds about right because the image is approx 2MB's. I am using the data notation in the tag to load a Base64 image.

i.e.

When I load a certain number of images (page turns) the app will crash.

The app is an ebook viewer, so when I turn to a new (not previously loaded in current session) the allocations increase. But, if I turn back to a previiously loaded page the allocations don't increase and the page loads quicker than a new one. Every page turn sends a request to the database so i'm beginning to think the leak isn't in the iOS and that it could be in the HTML5 app.

Any ideas on this? I guess there could just as easily be a leak in the HTML app as there could be in iOS. How do I go about debugging this?

Any ideas greatly appreciated.

Thanks

jim
  • 8,670
  • 15
  • 78
  • 149

2 Answers2

0

HTTP and WebKit likes to keep a local copy of resources, just in case you will need it again. This may be what you encounter.

Check the answers to this question: Is it possible to prevent an NSURLRequest from caching data or remove cached data following a request?

Community
  • 1
  • 1
Mats
  • 8,528
  • 1
  • 29
  • 35
  • Hi Mats, That solution seems to be for NSURLConnections. I'm loading the content into the webview using NSUrlRequest. I there anyway I can specify caching policy for that? Thanks. – jim Oct 07 '11 at 08:21
0

This was die an unfixable issue with iOS 4.

Issue resolved itself after upgrading to iOS5.

jim
  • 8,670
  • 15
  • 78
  • 149