UIWebview without Cache

前端 未结 4 843
旧巷少年郎
旧巷少年郎 2020-12-05 05:04

I want to load a webview without cache?

//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];
//URL Request Object
NSURLRequest *requestObj =         


        
4条回答
  •  臣服心动
    2020-12-05 05:46

    You can change your cache policy, using the code:

    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url 
                                            cachePolicy:NSURLRequestReloadIgnoringCacheData
                                        timeoutInterval: 10.0]; 
    

提交回复
热议问题