Page MenuHomePhabricator

Forced redirects to m.wikipedia.org (and lack of a return redirect)
Closed, ResolvedPublic

Description

Author: wes.turner

Description:
When I enter "http://en.wikipedia.org/wiki/Base64" in my address bar with Chrome on Android, I am force-redirected to "http://en.m.wikipedia.org/wiki/Base64", which is not the URL I entered.

If I then check the "Request Desktop Site" checkbox, the page reloads but I remain at "http://en.m.wikipedia.org/wiki/Base64" and I must manually remove the 'm.' from the URL in the address bar.

Possible solutions:

  1. Display a banner with an optional redirect to m.wikipedia.org
  2. When "Request Desktop Site" is checked, redirect to wikipedia.org
  3. Request a per-domain "desktop site mode" from the Chrome team.

I tend to access the "Desktop Site" when trying to link to TOC/Heading anchors within a page.

I understand that mobile mode is most useful in many situations.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=57127

Details

Reference
bz49653

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:55 AM
bzimport set Reference to bz49653.
bzimport added a subscriber: Unknown Object (MLST).

Not part of MediaWiki. Might be the MobileFrontend extension (?), but for now this can go to the Wikimedia product.

Does not sound like a "Wikimedia > Apache conf" issue to me, hence tentatively moving to MobileFrontend.

I'm not entirely sure what the "Request desktop site" does but I assume it sends a header that we do not respect.

I'd assume this would be a configuration change in the redirector rather than MobileFrontend itself.

If someone can find out what header it sets I'm sure we can get this looked into.

In the mean time if you click the desktop site link at the bottom of the page it should remember and give you the desktop site in future.

I cannot replicate this problem (I've tried in iOS simulator, with Chrome on my galaxy nexus, and spoofing mobile UA in desktop chrome); the only situation I can imagine this might happen in is if the reporter has cookies disabled.

Sorry to have been so brief, I had to run as I wrote the response.

'Request desktop site' contains a link to the desktop site with a query string parameter instructing MobileFrontend to toggle into the desktop view (in this case, http://en.wikipedia.org/w/index.php?title=Base64&mobileaction=toggle_view_desktop). When MobileFrontend toggles into desktop view this way and on our particular setup, the 'stopMobileRedirect' cookie gets set. The user will wind up in the desktop view, and the cookie will prevent further automatic redirects to the mobile (.m) version of the site (until the cookie expires [1 month] or the client clears cookies).

I just tested to see what happens with cookies disabled with Chrome on Android, and I just wind up getting redirected back to the mobile site.

Wes, when you tapped 'Desktop' did you stay in the mobile view, or did you see the desktop version of the site (but with en.m.wikipedia.org still in the URL bar)? What device/Android version are you using? Do you have cookies enabled?

wes.turner wrote:

(In reply to comment #5)

Sorry to have been so brief, I had to run as I wrote the response.

'Request desktop site' contains a link to the desktop site with a query
string
parameter instructing MobileFrontend to toggle into the desktop view (in this
case,
http://en.wikipedia.org/w/index.
php?title=Base64&mobileaction=toggle_view_desktop).
When MobileFrontend toggles into desktop view this way and on our particular
setup, the 'stopMobileRedirect' cookie gets set. The user will wind up in the
desktop view, and the cookie will prevent further automatic redirects to the
mobile (.m) version of the site (until the cookie expires [1 month] or the
client clears cookies).

I just tested to see what happens with cookies disabled with Chrome on
Android,
and I just wind up getting redirected back to the mobile site.

Wes, when you tapped 'Desktop' did you stay in the mobile view, or did you
see
the desktop version of the site (but with en.m.wikipedia.org still in the URL
bar)? What device/Android version are you using? Do you have cookies enabled?

Thanks for the help!

I have cookies enabled.

*A. Starting with "en.wikipedia.org/wiki/Base64"*

  1. > Launch Chrome on Android ("Request Desktop Site" defaults to unchecked. Cleared all browsing data.)
  2. > Enter "en.wikipedia.org/wiki/Base64"
  3. < Redirect to "en.m.wikipedia.org/wiki/Base64"
  4. > Check "Request Desktop Site"
  5. | Browser reloads "en.m.wikipedia.org/wiki/Base64"
  6. > Remove ".m" from URL, press Enter

*B. Starting with "en.m.wikipedia.org/wiki/Base64"* (B[3:])

  1. > Launch Chrome on Android ("Request Desktop Site" defaults to unchecked. Cleared all browsing data.)
  2. > Enter "en.m.wikipedia.org/wiki/Base64"
  3. > Check "Request Desktop Site"
  4. | Browser reloads "en.m.wikipedia.org/wiki/Base64"
  5. > Remove ".m" from URL, press Enter

wes.turner wrote:

Appears to be fixed (from here, at least)! Thanks!

*C. Starting with "en.wikipedia.org/wiki/Base64"*

  1. > Launch Chrome on Android ("Request Desktop Site" defaults to unchecked.

Cleared all browsing data.)

  1. > Enter "en.wikipedia.org/wiki/Base64"
  2. < Redirect to "en.m.wikipedia.org/wiki/Base64"
  3. > Check "Request Desktop Site"
  4. < Redirect to "en.wikipedia.org/wiki/Base64"

Ok, I'm totally puzzled about what might've happened - we've made no changes on our end since you initially reported the bug, though perhaps there was something wonky at the architectural level. Glad it's working now, closing and marking 'worksforme' :)

wes.turner wrote:

Unfortunately I tried again today and it *does not appear to be working as described in C* above (as it seemed to last night).

For a period of time last night, redirects seemed to be going to "www.m.wikipedia.org", which did not resolve.

Wes, I am baffled :( Are you still seeing incorrect behavior? If so, can you share your device info (model, OS, version #s, etc). We have no rules to send anything to www.m.wikipedia.org, so no clue how that might've happened...

Has anyone heard other reports of folks experiencing weirdness with redirects?

Wes, are you using the beta or experimental mode of Wikipedia?

wes.turner wrote:

@Jon
I was not aware that there are beta or experimental modes of Wikipedia.

@Arthur
When I am viewing an "m.en.wikipedia.org" page and I select "Request Desktop Site", I am not redirected to the "en.wikipedia.org" page, as enumerated in 'B' and 'C'.

(In reply to comment #6)

*A. Starting with "en.wikipedia.org/wiki/Base64"*

  1. > Launch Chrome on Android ("Request Desktop Site" defaults to unchecked.

Cleared all browsing data.)

  1. > Enter "en.wikipedia.org/wiki/Base64"
  2. < Redirect to "en.m.wikipedia.org/wiki/Base64"
  3. > Check "Request Desktop Site"

Can you provide a screenshot of your phone at step 1 or step 4? I'm not sure what you mean by "check" and "uncheck." These verbs are usually used in the context of a checkbox... I think a screenshot would help. You can attach it to Bugzilla (there's an "Add an attachment" link above).

I cleared all Chrome data.
Entered http://en.wikipedia.org/wiki/Base64
Redirects to mobile (expected)
set request desktop site
Reloads with mobile (expected)
Re enter http://en.wikipedia.org/wiki/Base64
No redirect (expected)

(Chrome Android 4)

Are you asking for a reverse redirect when on an en.m domain to an en.wiki domain?

That is how I understand the reporters description point 2. Btw. having redirects in both directions is for the user functionally equivalent to not having m domains at all, which would also save the redirects. The current behaviour also confused me.

There is a "desktop site"-option in the browser which changes the User-Agent that is sent and a link for the same goal at the bottom of the mediawiki page.

@Wes the Desktop link at the bottom of a page might be a convenient enough alternative.

  • Bug 57127 has been marked as a duplicate of this bug. ***

I experience this problem frequently. I might be a special case, but it is exceedingly rare that the mobile interface is what I want, so I have raised bug 57127 for an opt-out user pref.

This feature exists on most browsers on Android, including the stock 'Internet' app and Firefox beta.

On Chrome, it appears to be session based unless the owner fiddles with their phone.
http://www.guidingtech.com/16169/desktop-mode-websites-chrome-android-permanently/

I tried Firefox and the 'Internet' app on Android, and it appears to be session based on those browsers also.

  • This bug has been marked as a duplicate of bug 58425 ***