Page MenuHomePhabricator

Switching between desktop and mobile view should redirect to canonical URLs
Closed, ResolvedPublic


Currently, it redirects to /w/index.php?title=foo , which results in stale cache:,_1956%E2%80%931962
Last-Modified: Mon, 23 Apr 2012 05:59:47 GMT

Last-Modified: Mon, 23 Apr 2012 16:14:15 GMT

Version: unspecified
Severity: normal
See Also:



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:20 AM
bzimport set Reference to bz36182.

Any update on this bug? Is this an easy change?

Still not resolved, I see instances when this fix works on live site and some when it doesn't.

Max, can you give examples of where this is not working? One that I found quickly was on pages like:

Is this a namespace related issue?

(In reply to comment #4)

Is this a namespace related issue?

Maybe, I'll need to investigate this.

I think I've resolved this for desktop -> mobile requests that happen on sites that have a mobile URL template defined (eg the WMF cluster):

This should make all 'mobile view' links canonical, all the time. This should work fine on the WMF cluster which passes all .m traffic through the mobile varnish servers, which will always result in a mobile view (even without ?mobileaction=toggle_mobile_view).

This approach will not work in the reverse (mobile -> desktop view) because we need the mobileaction query param for non-js browsers to set the stopMobileRedirect cookie.