Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 455
Registered: ‎03-04-2011
My Device: Paper cup

WebView fallback / behavior on 404

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.


Thank you


New Member
Posts: 1
Registered: ‎10-29-2013
My Device: Q10 / Z10

Re: WebView fallback / behavior on 404

I encounter the same as your.

Does anyone have an idea?


Thanks for your help Smiley Happy

Haploid, make it mobile!
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: WebView fallback / behavior on 404

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.

Paul Bernhardt
Application Development Consultant

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker