Question

I have problems with loading reCAPTCHA with UIWebView component on iOS6.

The first time page loads fine. See screenshot for http://www.google.com/recaptcha/learnmore.

enter image description here

But subsequent load requests of the same page have captcha image missing.

enter image description here

My controller code is simple:

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com/recaptcha/learnmore"]]];
}

and the second time this controller is loaded I have broken reCAPTCHA image. Clearing cache with [[NSURLCache sharedURLCache] removeAllCachedResponses]; does not help. Specifying NSURLRequest cache policy like this does not work too:

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self.webView loadRequest:[NSURLRequest requestWithURL:[self.reCaptchaURL]
                                           cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
                                           timeoutInterval:60]];
}

The problem is specific to iOS 6.0 and iOS 6.1. On iOS 7.0 this code works fine.

Was it helpful?

Solution

It seems Google has fixed this bug. Now re-captcha works on iOS6.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top