Inconsistent HTML data in WebView
Inconsistent HTML data in WebView
- Subject: Inconsistent HTML data in WebView
- From: Bruce Cresanta <email@hidden>
- Date: Wed, 02 Feb 2011 20:57:14 -0700
Hello,
I noticed that in the didFinishLoadForFrame delegate method that the data in [[[sender mainFrame] dataSource] data] is blank for some websites.
When the web page loaded is http:// www.google.com is works beautifully.
When the web page loaded is http://www.php.net it doesn't contain anything even though the page loads in the browser.
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
{
// Only report feedback for the main frame.
if (frame == [sender mainFrame]){
[self setTabArrows:[tabs currentTab]];
NSData * data = [[[sender mainFrame] dataSource] data];
NSString * raw = [[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding: NSUTF8StringEncoding];
NSLog(@"%@", raw);
}
}
Is there a way to get consistent data from Webview?
Thank you,
Bruce
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden