Page MenuHomePhabricator

wgMobileDeviceName is not populated on
Closed, ResolvedPublic


Author: mwalker

The code mw.config.get( 'wgMobileDeviceName', 'desktop' ) returns "" on both logged in and out when using Chrome spoofing as "Android 2.3" and "Android 4.0.2".

It should behave as like where the same code returns "android".

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:32 AM
bzimport set Reference to bz47586.

the javascript doesn't seem to be varying anymore.

I can't see the vary header being set on the script containing the module mobile.xdevice.detect.script

Look in*

for mw.config.set("wgMobileDeviceName"

In mine at least it is being set to empty string. if I make the above url unique (e.g. append &cachebreak=true to url) I see mw.config.set("wgMobileDeviceName","webkit") on chrome as expected.

Css seems to be varying as per normal so that's a relief. The javascript not varying is not the end of the world...

Related URL: (Gerrit Change Ifbbd97830f0184eb843d616a7d2e70487169155c)

Related URL: (Gerrit Change If219c84d4755697ab849cfc083fa9234382f30f6)

This code probably makes more sense in CentralNotice on 2nd thoughts.

Note until is merged there is a potential but highly unlikely race condition which might request a banner for unknown device types such a 'webkit' (Gerrit Change If219c84d4755697ab849cfc083fa9234382f30f6) | change APPROVED and MERGED [by awjrichards]