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


Right now redirecting mobile users to * 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

kaldari created this task.Aug 18 2010, 7:21 PM

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

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.Sep 4 2010, 1:08 PM

Another config example:

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

might make that possible.

Tfinc added a comment.Sep 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: .

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

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

TheDJ added a comment.Feb 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.May 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.Jul 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 as soon as its ready.

Tfinc added a comment.Jul 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.Jul 29 2011, 7:59 PM

Wicked. That will be a nice step forward.

Tfinc added a comment.Aug 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.

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