04-11-2013 03:54 AM
If there's a 404, WebView is constructing a phony page titled with the domain name of the failed URL, and listing advertisements there for products and services that are based on its interpretation of the domain name.
The problem is that it's returning "Succeeded" even though the real page was actually not found, and examining the URL of the WebView still shows the requested URL so that to the application, it looks like the real page was found.
Manually entering the URL in the browser does the same thing, and the URL still shows as what was typed, rather than the URL of whatever's showing, which is not the real page.
How can I detect the 404 and use a proper fallback? i.e. get the WebView to tell me if it loaded the real URL, or not ? If the user's off the 'net or the server's down, I need to display a page embedded in the app.
10-29-2013 10:16 AM
That sounds more like your DNS provider giving you their own ad-laden page rather than the correct NXDOMAIN response, which some DNS providers and ISPs will do.
Basically, it makes it impossible to tell if a domain exists or not. Thank your ISP for hijacking the DNS system.