WebView says "Object moved" when a page redirects

Oliver Bosse

Member
Licensed User
Longtime User
there are often redirects on server and on client side of web sites.
very common example : http to https or redirects of ad banner links.
when this happens the webview shows a white page that says "Object moved".
how can i avoid that?

oliver
 
Last edited:

Oliver Bosse

Member
Licensed User
Longtime User
http://www.oliverbosse.com

call this website from your device and go to "Mobile apps" section.

use a webbrowser and the download links to android market work fine.

use webview inside an app and they don't because of the (maybe serverside) redirecting.

what can i do to avoid that ... or better make it work?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is what I get from the following code:
B4X:
   Dim wv As WebView
   wv.Initialize("wv")
   Activity.AddView(wv, 0, 0, 100%x, 100%y)
   wv.LoadUrl("http://www.oliverbosse.com/")

SS-2012-01-19_16.45.51.png
 
Upvote 0

Oliver Bosse

Member
Licensed User
Longtime User
at this point everything is ok.
but now go to "Mobile apps" and click on one of the app icons there.
they link to google marketplace.
none of them works for me.
 
Upvote 0

Oliver Bosse

Member
Licensed User
Longtime User
i know now where the problem is.
it's on the serverside, not on the client.

some browsers have the "too many redirects" issue

it can occur when a page is redirecting to a different site and that site again
is redirecting back to the original request url.

many ad networks do banner linking in that way.
it's often for analytics reasons and because they just act as a mediation service.
 
Last edited:
Upvote 0
Top