I use a WebViewController to visit some URL’s in an app.
Now I found out that the apps size slowly increases every time using the WebViewController.
It is when checking app size under iPhone usage and the Document and Data for that specific app increases for every time it is used. The app can be 2 Mb when installed but after a lot of usage it may easily increase to 25 Mb. How can I release that fingerprint when closing the app??
When calling for the WebViewController this is how it looks.
- (void) showURL:(NSURL *)address withTitle:(NSString *)title
{
MyWebViewController *vc = [[MyWebViewController alloc] initWithNibName:@"MyWebViewController" bundle:nil];//ny
vc.title = title;
vc.location = address;
[self.navigationController pushViewController:vc animated:YES];
[vc release];
}
h. file in WebWiewController has this in its content.
NSURL *location;
IBOutlet UIWebView *theWebView;
and the m.file has this
- (void)viewDidLoad
{
[super viewDidLoad];
[theWebView loadRequest:[NSURLRequest requestWithURL:location]];
}
It seems that your Webview is caching the page.
Maybe you should manually create your http request to custom the cache policy.
for example :
I did not try the code, it’s just to give an idea.