In the [webView:shouldStartLoadWithRequest:navigationType:] event, how can you tell the difference between an iframe that\'s loading content vs. the entire page loading content?
I've successfully used the HTTP "referer" (the actual header is misspelled) field to detect this. This should either be the URL of the main page (available from the webview) or something else -- probably a frame.
NSString *referer = [request.allHTTPHeaderFields objectForKey:@"Referer"];
NSString *currentPage = [webView.request.mainDocumentURL absoluteString];
BOOL isFrameLoad = [referer isEqualToString:currentPage] == NO;