Redirect to mobile gateway should be handled on the server-side rather than the client-side
Closed, ResolvedPublic

Description

Right now redirecting mobile users to *.mobile.wikipedia.org is handled by client-side Javascript. Ideally, the redirect should be handled on the server-side (probably by the squid servers or whatever directs requests to the squid servers).

This will make it easier to fix bugs like Bug 23554.


Version: --
Severity: normal

bzimport set Reference to bz24859.
kaldari created this task.Via LegacyAug 18 2010, 7:21 PM
Tfinc added a comment.Via ConduitAug 20 2010, 11:40 PM

Issue has been raised with the ops team. Waiting to hear back to determine action plan.

kaldari added a comment.Via ConduitAug 21 2010, 1:23 AM

Comment from Brion Vibber (via Wikitech-l):
What would be required would be some filtering in the caches to check for particular User-Agents or other settings and send them the redirect directly, or send them through to PHP for possible redirection. (Assuming there's no problem with downstream caching, which I think should usually be ok the way we have things marked -- as long as the redirect responses are marked as private-cache or uncacheable.)

TheDJ added a comment.Via ConduitSep 4 2010, 1:08 PM

Another config example: http://en.positon.org/post/Squid-26-redirection

The problem is of course that the cookie value needs to be taken into account. Apparently

http://www.squid-cache.org/mail-archive/squid-users/200703/0129.html

might make that possible.

Tfinc added a comment.Via ConduitSep 8 2010, 6:57 PM

(In reply to comment #2)

Issue has been raised with the ops team. Waiting to hear back to determine
action plan.

RT ticket open about this issue: http://rt.wikimedia.org/Ticket/Display.html?id=196 .

In the meantime we might be able to do the redirect within the resource loader to make the experience a bit faster.

kaldari added a comment.Via ConduitSep 8 2010, 7:09 PM

According to Trevor the Resource Loader won't be deployed until mid-November or so. (I'm guessing December.)

TheDJ added a comment.Via ConduitFeb 16 2011, 9:23 PM

Now that the Resource Loader is deployed, this should get much higher priority.

Mobile devices now have to load the entire page, before the mobile redirect script is executed. Making the whole exercise pretty useless, and probably some older devices, won't even reach the bottom of the page.

Tfinc added a comment.Via ConduitMay 10 2011, 6:17 PM

This is going to be taken care of by the mobile rewrite port. Marking as defendant on Bug #25558.

Tfinc added a comment.Via ConduitJul 27 2011, 9:36 PM

Looks like were not blocked on the new extension anymore. Thanks to Asher and Patrick we have a list of ACL's that can go directly in to squid. Early production tests picked up more user agents then they should have but we've fixed that up. Production push will be posted on http://wikitech.wikimedia.org/view/Software_deployments as soon as its ready.

Tfinc added a comment.Via ConduitJul 29 2011, 7:06 PM

Were doing one box testing on the squids right now. If all goes well were aiming to do a full ACL deploy early next week.

TheDJ added a comment.Via ConduitJul 29 2011, 7:59 PM

Wicked. That will be a nice step forward.

Tfinc added a comment.Via ConduitAug 2 2011, 9:19 PM

Were still tweaking our regexes so that we don't catch things like API request to EN wiki. If you have any questions send them over to binasher on irc.

bzimport added a comment.Via ConduitAug 5 2011, 7:02 PM

afeldman wrote:

The mobile redirect is now being handled by our frontend squids, which are now picking a much larger set of devices. Long live the javascript redirect!

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.