Hi, after a discussion with Jon, we decided that the usage of X-Device for
CentralNotice platform-specific banners is a dead end. It has the following
* X-Device was created for regulating frontend caching allowing some
device/browser specific CSS. It was not intended for anything else.
* It is not grouped by platform. Or browser type. It is grouped by
* X-Device usage is dictated by performance. So if CN needs to distinguish
between iPhone 4 and 5, for example, the answer will be "no can do", we
can't increase cache fragmentation for the sake of banners.
* We are working on decreasing the number of X-Devices: there's no
guarantee that we will not merge 'android' into 'webkit' one day.
* Android-based browsers can correspond to 'android', 'webkit',
and 'operamobile' X-Device strings, the latter 3 being shared with several
other platforms. We in general need to target all Android users with our
app banners, not users of a specific Android browser.
Thus, we decided to change it.
support from MobileFrontend.
adds basic detection code to
Ideally, every mobile banner could specify a user-agent regex and a special
ResourceLoader module collect the regexes from all available banners.