Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIWebview without Cache

Tags:

ios

iphone

I want to load a webview without cache?

//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];
//URL Request Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
[kdgWebView loadRequest:requestObj];
like image 619
Jean St John Avatar asked Mar 16 '12 21:03

Jean St John


1 Answers

You can change your cache policy, using the code:

NSURLRequest *requestObj = [NSURLRequest requestWithURL:url 
                                        cachePolicy:NSURLRequestReloadIgnoringCacheData
                                    timeoutInterval: 10.0]; 
like image 130
LuisEspinoza Avatar answered Nov 15 '22 11:11

LuisEspinoza