Closed
Bug 906538
Opened 11 years ago
Closed 11 years ago
[Flatfish] Update user agent for large device
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gasolin, Assigned: viralwang)
References
Details
Attachments
(1 file, 1 obsolete file)
refer to https://github.com/gaia-local/gaia/issues/109
We should change user agent to fit large device browsing.
maybe provide with customization(too flexible), or from gecko?
Comment 1•11 years ago
|
||
We should open a discussion on this at the compat meeting and on dev-b2g on what UA we want for Firefox OS tablets. Adding some guys to the cc list as such who would have an opinion on this.
![]() |
||
Comment 2•11 years ago
|
||
Could someone give more background about the issue? Both here and github do not give a summary of the issue we are trying to solve.
Comment 3•11 years ago
|
||
The "obvious" UA for a Firefox OS tablet is one which takes the Firefox OS UA from <https://wiki.mozilla.org/B2G/User_Agent>:
Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0
and replaces "Mobile" with "Tablet", as we have done on Android. So:
Mozilla/5.0 (Tablet; rv:18.0) Gecko/18.0 Firefox/18.0
This would fit with our current UA strategy.
Gerv
Comment 4•11 years ago
|
||
(In reply to Gervase Markham [:gerv] from comment #3)
> The "obvious" UA for a Firefox OS tablet is one which takes the Firefox OS
> UA from <https://wiki.mozilla.org/B2G/User_Agent>:
>
> Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0
>
> and replaces "Mobile" with "Tablet", as we have done on Android. So:
>
> Mozilla/5.0 (Tablet; rv:18.0) Gecko/18.0 Firefox/18.0
>
> This would fit with our current UA strategy.
>
> Gerv
That makes sense. Since I expect this question to come up - if an operator enforces having device information in the user agent for a tablet, what UA should we suggest in that case?
Comment 5•11 years ago
|
||
Comment 3 captures my thoughts as well.
(In reply to Jason Smith [:jsmith] from comment #4)
> That makes sense. Since I expect this question to come up - if an operator
> enforces having device information in the user agent for a tablet, what UA
> should we suggest in that case?
If the device is wifi only, this may not be an issue. Do we know if the device will include a data connection?
Comment 6•11 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #4)
> That makes sense. Since I expect this question to come up - if an operator
> enforces having device information in the user agent for a tablet, what UA
> should we suggest in that case?
Same modification that we make for a phone - between "Tablet" and "rv". But really, tablets get desktop sites, and desktop sites already need to cope with a variety of screen sizes. The arguments for a device identifier in this case are even weaker.
Gerv
Updated•11 years ago
|
Component: Gaia → General
Comment 8•11 years ago
|
||
(In reply to Lawrence Mandel [:lmandel] from comment #5)
> Comment 3 captures my thoughts as well.
>
> (In reply to Jason Smith [:jsmith] from comment #4)
> > That makes sense. Since I expect this question to come up - if an operator
> > enforces having device information in the user agent for a tablet, what UA
> > should we suggest in that case?
>
> If the device is wifi only, this may not be an issue. Do we know if the
> device will include a data connection?
Flatfish is wifi only.
Comment 10•11 years ago
|
||
(In reply to Gervase Markham [:gerv] from comment #9)
> OK. Then I think the UA in Comment 3 is the right one.
I concur.
Reporter | ||
Comment 11•11 years ago
|
||
viral,
do we have to change default user-agent to 'Mozilla/5.0 (Tablet; rv:26.0) Gecko/26.0 Firefox/26.0' from gecko side? (I think B2G 1.2 use gecko 26, right?)
https://github.com/gaia-local/gaia/issues/109 only override some sites that not shown properly with the default user-agent.
Flags: needinfo?(vwang)
Comment 12•11 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #11)
> viral,
>
> do we have to change default user-agent to 'Mozilla/5.0 (Tablet; rv:26.0)
> Gecko/26.0 Firefox/26.0' from gecko side? (I think B2G 1.2 use gecko 26,
> right?)
>
> https://github.com/gaia-local/gaia/issues/109 only override some sites that
> not shown properly with the default user-agent.
Yes, we need automatic detection of tablets in gecko, like we do for android. I first approximation could be to consider any device with a screen larger than 7" to be a tablet.
Reporter | ||
Comment 13•11 years ago
|
||
for reference, in gaia we use 768px to distinguish phone/tablet size device (value comes from bootstrap 3)
Comment 14•11 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #13)
> for reference, in gaia we use 768px to distinguish phone/tablet size device
> (value comes from bootstrap 3)
Are these css pixels or device pixels?
Reporter | ||
Comment 15•11 years ago
|
||
css pixels
Comment 16•11 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #11)
> do we have to change default user-agent to 'Mozilla/5.0 (Tablet; rv:26.0)
> Gecko/26.0 Firefox/26.0' from gecko side? (I think B2G 1.2 use gecko 26,
> right?)
I'm not sure what you are asking, but: the user agent is constructed automatically from what Firefox knows about itself. As long as you make sure it knows it's a tablet, the UA should come out fine.
Gerv
Assignee | ||
Comment 17•11 years ago
|
||
I'm thinking about this is device dependency issue.
We already check the system-info to have correct user agent in nsHttpHandler::InitUserAgentComponents().
However, "tablet" property can only set when MOZ_WIDGET_ANDROID is defined.
All we need to do is to support in MOZ_WIDGET_GONK is defined in nsSystemInfo::Init().
Flags: needinfo?(vwang)
Assignee | ||
Comment 18•11 years ago
|
||
Hi Fabrice,
I think we can use ro.build.characteristics to check which device it is.
If it is "tablet" and we can set user agent to "Tablet", otherwise, keep the "Mobile" as we did before.
Attachment #806547 -
Flags: review?(fabrice)
Updated•11 years ago
|
Attachment #806547 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 19•11 years ago
|
||
add reviewer in the comment of the patch
Assignee: nobody → vwang
Attachment #806547 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 20•11 years ago
|
||
Keywords: checkin-needed
Comment 21•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•