I have a site I'm loading with a UIWebView that has some problems loading when secured with Basic Authtype of Apache:
NSString * myUrlAddress = [NSString stringWithFormat:@"http://user:pass@mysite.mydomain.com"];
NSURL *url = [NSURL URLWithString:myUrlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:60.0];
[webView loadRequest:requestObj];
Initial loading works most of the times, but sometimes, especially on reloading of the app the callback
- (void)webViewDidFinishLoad:(UIWebView *)webViewloc
is not reached, and it is also not running into
-(void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error
If I use a different server without .htaccess to secure the page it all works fine.
I also see in the access log, that it sometimes just stops loading from the page.
Has this something to do with cachePolicy
or timeoutInterval
?