Add USER_AGENT_MODE_TABLET
Categories
(GeckoView :: General, defect, P3)
Tracking
(firefox67 wontfix, firefox67.0.1 wontfix, firefox68 wontfix, firefox69 wontfix, firefox70 wontfix)
People
(Reporter: sebastian, Unassigned)
References
Details
- Fenix issue: https://github.com/mozilla-mobile/fenix/issues/1848
- MDN: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox#Mobile_and_Tablet_indicators
The platform part of the UA string indicates if Firefox is running on a phone-sized or tablet device. When Firefox runs on a device that has the phone form factor, there is a Mobile; token in the platform part of the UA string. When Firefox runs on a tablet device, there is a Tablet; token in the platform part of the UA string instead.
Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0
Mozilla/5.0 (Android 4.4; Tablet; rv:41.0) Gecko/41.0 Firefox/41.0
We already support setting USER_AGENT_MODE_MOBILE
and USER_AGENT_MODE_DESKTOP
. We may want to add a USER_AGENT_MODE_TABLET
flag.
https://mozilla.github.io/geckoview/javadoc/mozilla-central/org/mozilla/geckoview/GeckoSessionSettings.html#USER_AGENT_MODE_DESKTOP
Comment 1•5 years ago
|
||
We may want to let this go. Android tablet market share is not large. Having a different user agent for a small percentage of the users makes supporting Firefox on Android more complicated.
Reporter | ||
Comment 2•5 years ago
|
||
NI-ing Mike Talyor for input since he commented on the Fenix issue:
This affects the experience on Bing, probably on a lot of other sites.
Comment 3•5 years ago
|
||
We probably need Product sign off to make a decision to not include it.
We could send a UA override for bing (whenever we will have that capability), and attempt outreach, but we probably need to test other top sites (google properties for sure).
Andreas, WDYT?
Comment 4•5 years ago
|
||
I think we need to differentiate between mobile and tablet. 15% of Fennec users uses Fennec on a tablet, so it's a not insignificant portion of our user base. This might be somewhat different in Fenix of course, but still.
Comment 5•5 years ago
|
||
Thanks Andreas. I think in order to be consistent with Fennec, we should also support USER_AGENT_MODE_TABLET
.
We could revisit in the future, but I'd prefer to not fork on UA string behavior just for tablets.
Comment 6•5 years ago
|
||
If we're going to add USER_AGENT_MODE_TABLET
, we should probably add USER_AGENT_MODE_TV
for completeness. Gecko has code to add "TV" to the User-Agent string:
Comment 7•5 years ago
|
||
TV-specific content is not a thing, so it probably doesn't make a whole lot of sense. TV is similar to tablet/desktop in terms of form factor, with perhaps a Device-Pixel Ratio of 1.5, so just giving it a desktop or tablet UA string makes more sense.
Reporter | ||
Comment 8•5 years ago
|
||
Will this make GV 68?
Looking at the webcompat issues referencing the Fenix issue a bunch of people seem to care about Bing not working:
https://github.com/mozilla-mobile/fenix/issues/1848
Comment 9•5 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian; :pocmo) from comment #8)
Will this make GV 68?
Looking at the webcompat issues referencing the Fenix issue a bunch of people seem to care about Bing not working:
https://github.com/mozilla-mobile/fenix/issues/1848
(Note: those reports were reported by our SV team while doing some top site testing, so take the quantity with a grain of salt.)
Comment 10•5 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian; :pocmo) from comment #8)
Will this make GV 68?
No. We don't plan to work on this for GV 68 because the Fenix issue is only priority P3 and not labeled "MVP Blocker". But let me know if that changes. :)
Comment 11•5 years ago
|
||
Deferring this bug from Fenix's M7 (July) milestone to the M8 backlog for later in Q3.
Comment 12•5 years ago
|
||
not Q3
Comment 13•5 years ago
|
||
This might be a good first bug.
Updated•4 years ago
|
Updated•2 years ago
|
Comment 14•2 years ago
|
||
Removing good-first-bug
because we will probably change Fenix's tablet UA string soon.
Updated•2 years ago
|
Updated•1 year ago
|
Comment 15•1 year ago
|
||
Has this been implemented recently? Version 109 has caused websites to serve desktop (tablet?) versions on my Surface Duo. Please see 1807209 for details.
Comment 16•1 year ago
|
||
(In reply to Jamie Kitson from comment #15)
Has this been implemented recently? Version 109 has caused websites to serve desktop (tablet?) versions on my Surface Duo. Please see 1807209 for details.
Thanks for reporting this issue. The Tablet problem in bug 1809221 has been fixed separately.
Instead of implementing this Tablet UA string, we may decide to send Firefox desktop's UA string on tablets (bug 1790516), similar to how iPad Safari sends a macOS Safari UA string.
Comment 17•1 month ago
|
||
This bug has been superseded by bug 1790516 to default to a desktop UA string on tablets (like Safari on iPad and Chrome on "premium" tablets) instead of restoring legacy Fennec's Tablet UA string in Fenix. Since neither Safari's nor Chrome's UA strings on tablets include a "Tablet" token, including one in Fenix would be risky because it would trigger web code paths that might not be well-tested because they're not used for Safari or Chrome.
Description
•