Closed Bug 773355 Opened 12 years ago Closed 8 years ago

Consider replacing 'Tablet' with 'Touch' in the User Agent string

Categories

(Core :: Networking: HTTP, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: dao, Unassigned)

References

Details

(Keywords: site-compat)

http://blogs.msdn.com/b/ie/archive/2012/07/12/ie10-user-agent-string-update.aspx

IE10 introduces the Touch token, which overlaps with our Tablet token. The intent is mostly the same, I think, except that we'd in theory omit Tablet when attaching a pointing device while IE10 would keep Touch.

It would be nice to get cross-browser consistency here.
Hmm.

I can see the argument for "Touch". But are we saying something about form factor (e.g. an approximate proxy for screen size), or is it about interaction style? We've gone for the former, IE for the latter.

If we go for "Touch", surely we should add it to all touchscreen mobile devices as well, alongside the "Mobile" token? Is it clear what they will be doing for Windows Mobile?

IOW, our "Tablet" and "Mobile" _both_ pretty much imply "Touch".

XUL Fennec shipped on tablets saying Tablet, but perhaps we shouldn't let that bind us. 

Native Fennec Tablet hasn't quite shipped, although it will soon. We could change before it does, if we decide this is the right thing.

Gerv
(In reply to Gervase Markham [:gerv] from comment #1)
> I can see the argument for "Touch". But are we saying something about form
> factor (e.g. an approximate proxy for screen size), or is it about
> interaction style? We've gone for the former, IE for the latter.

The screen size isn't all that interesting as it seems close enough to desktop / notebook settings. We wouldn't have added the Tablet token if it was just for that.

> If we go for "Touch", surely we should add it to all touchscreen mobile
> devices as well, alongside the "Mobile" token? Is it clear what they will be
> doing for Windows Mobile?

Not necessarily. As you say, Mobile implies a touch device, so this seems sufficient.
A discussion in mozilla.dev.platform revealed very little support for this change. We seem to  be in line with Apple (although they spell it "iPad") and Opera. Let's leave it.

Gerv
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
I'm late to this discussion. Sorry.

Tablet is soon to become a much less useful token -- especially on Windows. We are about to see a flood of convertible laptop/tablets as well as touch-enabled laptops and all-in-one PCs.

Also, we may need this token to be dynamic. For something like Microsoft's Surface (and the half dozen or so similar convertibles that'll be released this year,) some of the time the device will be "touch screen and keyboard+trackpad" and other times it will be "touch screen only" depending on what configuration is being used.

I think we should go with Touch like Microsoft and not Tablet.

- A
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
This discussion was had much more eloquently than I could put it, but I do feel  it's important to note that Touch could be anything. The market is in fact flooded with touch devices. Whether smartphone, tablet or desktop. On top of that, we're set for a flood of touch ultrabooks. Touch is simply another way to interact with the system, but the form fact of the system is still what's paramount. Whether you have a tablet like the Surface or something that pre-dates it like the ASUS Transformer, it's still ultimately a tablet. The Prime is sold as a tablet and the surface is marketed as a tablet. Let's not make matters more confusing than they need be.
> the form fact of the system is still what's paramount

Is that true? As a web developer, I am much more likely to want to adapt my site to touch vs. mouse than I am to adapt it for desktop vs. notebook. Not all touch devices are either a) mobile phones or b) in a tablet form factor.

Let's say someone, tomorrow, ships a touch-screen monitor to attach to a desktop, and also a touch-screen-enabled laptop. If they haven't already. Would it be correct, assuming Firefox could detect this, to have the Tablet token in the UA? Or would we say "No, it's not a tablet form factor, we leave it out"? 

Gerv
A touch-enabled monitor, a touch-enabled laptop and a touch-enabled tablet have different interactions, so I'm not sure why any but the last should say tablet. And remember, this is simply a case of tablet vs touch. The interactions you make with each of the above differ vastly, some for the sheer ergonomics and muscle memory of it all. Touch will eventually dominate the way people interact with their machines and consigning that interaction to tablet is short-sighted.

If the question is changed to should we append "touch" to our UA where viable? That's a different discussion completely.
(In reply to Paul [sabret00the] from comment #5)
> Whether you have a tablet like the Surface or
> something that pre-dates it like the ASUS Transformer, it's still ultimately
> a tablet. 

This is not true. These are hybrid devices. The Transformer Book, for example, is called a "convertible ultrabook" by Asus, which is not the same thing as the dockable Asus Tablet 810 which is called a tablet but which can dock into a clamshell keyboard.  See also other form factors like the Lenovo IdeaPad Yoga, the Asus Taichi, and the Dell, MSI, and Toshiba slider hybrids.

In addition to the Surface, and surface-like convertibles, there are also "normal" laptops with touchscreens like the Aspire S7, the Spectre TouchSmart Ultrabook, and the Samsung Series 5 Ultra laptop (I expect double-digit percentages of laptops to have touchscreens next year) and there are touchscreen all-in-one PCs, some of which come with a large removable tablet.
(In reply to Asa Dotzler [:asa] from comment #8)
> (In reply to Paul [sabret00the] from comment #5)
> > Whether you have a tablet like the Surface or
> > something that pre-dates it like the ASUS Transformer, it's still ultimately
> > a tablet. 
> 
> This is not true. These are hybrid devices. The Transformer Book, for
> example, is called a "convertible ultrabook" by Asus, which is not the same
> thing as the dockable Asus Tablet 810 which is called a tablet but which can
> dock into a clamshell keyboard.  See also other form factors like the Lenovo
> IdeaPad Yoga, the Asus Taichi, and the Dell, MSI, and Toshiba slider hybrids.
> 
> In addition to the Surface, and surface-like convertibles, there are also
> "normal" laptops with touchscreens like the Aspire S7, the Spectre
> TouchSmart Ultrabook, and the Samsung Series 5 Ultra laptop (I expect
> double-digit percentages of laptops to have touchscreens next year) and
> there are touchscreen all-in-one PCs, some of which come with a large
> removable tablet.

My apologies, I was rather ambiguous and that lead to confusion. I was referring to the ASIS (Android) Transformers (TF101, TF201, TF301 and TF700): e.g.  http://eee.asus.com/eeepad/transformer-prime/features/ which is clearly marketed at the tablet market.

Regarding your second paragraph, we're in agreement that touch-enabled devices will be a huge part of computing in general and as such, there should definitely be a discussion about adding touch to UA for devices that support it rather than using "touch" to denote tablet.
We might want to close this bug in regards to "replacing" tablet with touch and instead open a new bug and discussion in general about considering appending "touch" to the UA string for tablets. Does that sound like a reasonable direction to go?
jsmith: I don't think so. There would only be a purpose in having two separate tokens if we thought it was a major (and I mean major) requirement that websites must know that the device on which they are being viewed is a thin rectangle. And I don't think there is such a requirement.

If we are retaining "Tablet", we need to figure out whether we are using it for thin rectangles, or whether we are using it to denote that the mechanism that the user is going to use to interact with the site is significantly different to that which has been dominant for the first 15 years of the web. And if it's the latter, then we could continue to spell it "Tablet", even for devices which aren't tablets, or we could spell it "Touch".

But I see no value in having both tokens. When would we ever want "Tablet" without "Touch"?

Gerv
(In reply to Jason Smith [:jsmith] from comment #10)
> We might want to close this bug in regards to "replacing" tablet with touch
> and instead open a new bug and discussion in general about considering
> appending "touch" to the UA string for tablets. Does that sound like a
> reasonable direction to go?

Yes please. I vote for this, a much more appropriate discussion.
Reasons against Touch:
 * We don’t yet know if Microsoft’s “Touch” really means touch until IE10 for Windows Phone 8 ships.

 * Microsoft’s attempt to introduce touch to desktops and laptops may well fail due to ergonomic issues. Let’s not make their failure our failure. We don’t need to participate in advertising Microsoft’s touch vision when Firefox runs on a touch-enabled desktop.

 * Microsoft has pointer events. We have touch events. Code that assumes Microsoft’s events when “Touch” is in the UA string would fail in Firefox.

 * Both Opera Mobile and Firefox have shipped with “Tablet”. Keeping changing the UA string is bad for evangelism.

 * Apple is the trend setter in the tablet space—not Microsoft, so we should follow the Apple/Google taxonomy instead of Microsoft’s taxonomy. Web authors already think in terms of desktop/tablet/phone, because that’s what Apple has (spelled Mac/iPad/iPhone for Apple’s UA strings). For all we know at present, Microsoft is an also-ran in the tablet space, so we don’t need jump to imitating them.
(In reply to Henri Sivonen (:hsivonen) from comment #13)
> Reasons against Touch:
>  * We don’t yet know if Microsoft’s “Touch” really means touch until IE10
> for Windows Phone 8 ships.

On that one point: I would expect "Mobile" to imply "Touch". I don't think that's an unreasonable position. So if Windows Phone 8 ships with "Mobile" but not "Touch", it wouldn't make me think something was wrong.
 
>  * Microsoft’s attempt to introduce touch to desktops and laptops may well
> fail due to ergonomic issues. Let’s not make their failure our failure. We
> don’t need to participate in advertising Microsoft’s touch vision when
> Firefox runs on a touch-enabled desktop.

Would you send "Tablet" for a touch-enabled desktop? Or only for devices where touch was the only interaction method?
 
Your other points are good ones.

Gerv
This bug is only for tablets. Trying to grow the scope to all touch-enabled devices isn't helpful. Please create another bug for that.(In reply to Gervase Markham [:gerv] from comment #14)
> (In reply to Henri Sivonen (:hsivonen) from comment #13)
> > Reasons against Touch:
> >  * We don’t yet know if Microsoft’s “Touch” really means touch until IE10
> > for Windows Phone 8 ships.
> 
> On that one point: I would expect "Mobile" to imply "Touch". I don't think
> that's an unreasonable position. So if Windows Phone 8 ships with "Mobile"
> but not "Touch", it wouldn't make me think something was wrong.
>  
> >  * Microsoft’s attempt to introduce touch to desktops and laptops may well
> > fail due to ergonomic issues. Let’s not make their failure our failure. We
> > don’t need to participate in advertising Microsoft’s touch vision when
> > Firefox runs on a touch-enabled desktop.
> 
> Would you send "Tablet" for a touch-enabled desktop? Or only for devices
> where touch was the only interaction method?
>  
> Your other points are good ones.
> 
> Gerv

This bug is only for tablets. Trying to grow the scope (after the bug was previously closed) to all touch-enabled devices isn't helpful. Please create another bug for that.
We don't modify the UA for other device specific limitations like screen size, network bandwidth/latency, or processing power. In these cases developers must detect and deal with the limitations in other ways. Is there a method that a site can use to detect whether a device is touch capable that does not require the addition of "touch" to the UA?
(In reply to Paul [sabret00the] from comment #15)
> This bug is only for tablets. Trying to grow the scope to all touch-enabled
> devices isn't helpful. 

This bug is about whether we should replace "Tablet" with "Touch" in the User Agent string. The only reason we would want to do so would be because "Touch" is a better description of the factor which unites all the devices on which we want to use this marker than "Tablet" is. 

If we have already decided that we are only marking thin flat rectangles, then there's not much point in making the switch. But that's not decided - it's the very question we need to answer in order to resolve this bug.

(In reply to Lawrence Mandel [:lmandel] from comment #16)
> We don't modify the UA for other device specific limitations like screen
> size, network bandwidth/latency, or processing power. In these cases
> developers must detect and deal with the limitations in other ways. Is there
> a method that a site can use to detect whether a device is touch capable
> that does not require the addition of "touch" to the UA?

Indeed we don't. But we do, at least at the moment, group into 3 categories - Mobile, Tablet and Desktop (defined as neither Mobile nor Tablet). The question here is: what are the boundaries of those categories? Into which category does a touch-enabled desktop computer fit? Why is this information in the UA string in the first place? (Let's assume for a moment we are not going to remove the Mobile token; I think that very, very unlikely. You could argue for removing the Tablet token and merging the other two categories, I suppose.) 

Gerv
(In reply to Gervase Markham [:gerv] from comment #14)
> Would you send "Tablet" for a touch-enabled desktop? 

No.

> Or only for devices where touch was the only interaction method?

Only for hand-held devices that are larger that some magic threshold to be considered tablets as opposed to being phone-sized. (It seems the magic threshold is that the screen diagonal must be ≥ 7" for the device to be a tablet. Apparently Galaxy Note is not a tablet but there are “7-inch tablets”.) If technically feasible, I’d suppress the Tablet token when the same device is docked to be laptop-like for interaction purposes.
I think we should regard the UA for what it is today:
1. a mechanism to determine market share
2. a mechanism for sites to differentiate between desktop and mobile devices for the purposes of serving different content

I don't think that we should give sites another reason to use the UA (adding a device capability like "touch" - yes, some other vendor UAs do include hardware characteristics) or introduce dynamic changes to our desktop or mobile UAs based on device capability, as this has the risk of introducing new compatibility problems.

And, continuing Gerv's comment 17 thoughts, if we expect touch capable desktop computers to be the norm at some point, how will adding "touch" to the UA across the board benefit the browser or a site?
(In reply to Lawrence Mandel [:lmandel] from comment #19)
> I think we should regard the UA for what it is today:
> 1. a mechanism to determine market share
> 2. a mechanism for sites to differentiate between desktop and mobile devices
> for the purposes of serving different content

Indeed. The question here is, in your point 2, whether "desktop and mobile" is the right split. We actually have a de facto 3-way split, because we currently send mobile/tablet/desktop.

> I don't think that we should give sites another reason to use the UA (adding
> a device capability like "touch" - yes, some other vendor UAs do include
> hardware characteristics) or introduce dynamic changes to our desktop or
> mobile UAs based on device capability, as this has the risk of introducing
> new compatibility problems.

So you would keep the Tablet token in docked tablets?

> And, continuing Gerv's comment 17 thoughts, if we expect touch capable
> desktop computers to be the norm at some point, 

Do we expect that? I'm not sure I do...

> how will adding "touch" to
> the UA across the board benefit the browser or a site?

Because "the norm" != "ubiquitous".

I thought it was obvious, but maybe it's not - the big reason a site might want to know that a device is either a tablet or is touch-sensitive (depending on which side of this discussion you are on) is that the interaction patterns can be significantly different to something mouse and keyboard based, and this might have a big effect on the site - perhaps to the extent of it being a different site entirely, just as some places have a mobile site which is entirely different. That's why there is a case for it being in the UA, when we don't include other 'hardware' characteristics.

Gerv
(In reply to Gervase Markham [:gerv] from comment #17)
> You could argue for removing the Tablet token and merging the other two categories, I suppose.) 

I strongly would/have argue(d) for this. Giving "Mobile" in the UA was something we did mainly because of a VERY strong demand and not because we were happy about it.

It wasn't until recently that it seemed to dawn on mainstream webdevs that they could use media queries to write one site that worked on both mobile and desktop. I don't want to disrupt that momentum. We can/should/do provide clear ways for them to detect touch capability on the client and adjust their scripts/css for it.
(In reply to Gervase Markham [:gerv] from comment #20)
> Indeed. The question here is, in your point 2, whether "desktop and mobile"
> is the right split. We actually have a de facto 3-way split, because we
> currently send mobile/tablet/desktop.

I don't know the answer to this one but, to me, "touch" does not seem to be the right token to add to this mix. Perhaps I'm still not seeing the vision.

> So you would keep the Tablet token in docked tablets?

Should the content change drastically because I now have access to a keyboard, mouse, or larger screen? If so, can the site do that dynamically? With UA sniffing the onus is on the client to reload. Should the browser reload all pages when the tablet is docked? Does a user have to reload manually? Is a change in the UA in this case going to provide an improvement to the user experience?

> I thought it was obvious, but maybe it's not - the big reason a site might
> want to know that a device is either a tablet or is touch-sensitive
> (depending on which side of this discussion you are on) is that the
> interaction patterns can be significantly different to something mouse and
> keyboard based, and this might have a big effect on the site - perhaps to
> the extent of it being a different site entirely, just as some places have a
> mobile site which is entirely different. That's why there is a case for it
> being in the UA, when we don't include other 'hardware' characteristics.

This is a fair point. However, innovating in the UA (as we're discussing here) seems to me to be the wrong approach. We want to discourage UA sniffing and encourage responsive design and feature detection.
wesj: what ways are there for devs to detect that Firefox is running on a touch-capable device? If those ways exist and can be documented, perhaps it's not too late to consider abandoning the Tablet token altogether. It's only shipped in 1 or 2 releases of Fennec for Android tablets.

Gerv
(In reply to Gervase Markham [:gerv] from comment #23)
> wesj: what ways are there for devs to detect that Firefox is running on a
> touch-capable device?

https://developer.mozilla.org/en-US/docs/Mobile/Firefox_Mobile_for_developers#CSS.C2.A0for_touch-specific_UI.C2.A0elements
OK... is there any standard way, or a way which is on track to being standard?

Gerv
(In reply to Dão Gottwald [:dao] from comment #24)
> https://developer.mozilla.org/en-US/docs/Mobile/
> Firefox_Mobile_for_developers#CSS.C2.A0for_touch-specific_UI.C2.A0elements

IMHO, we 1) should have something to check from JS as well (a navigator object property?) and 2) get this media query thing standardized.

And I fully agree with comment #22, esp. its last paragraph.
(In reply to Robert Kaiser (:kairo@mozilla.com) from comment #26)
> (In reply to Dão Gottwald [:dao] from comment #24)
> > https://developer.mozilla.org/en-US/docs/Mobile/
> > Firefox_Mobile_for_developers#CSS.C2.A0for_touch-specific_UI.C2.A0elements
> 
> IMHO, we 1) should have something to check from JS as well

https://developer.mozilla.org/en-US/docs/DOM/Using_media_queries_from_code
FWIW, sites are also using the presence of w3c touch interfaces to detect touch capable devices. We will be disabling the visibility of these interfaces on non-touch friendly hardware. We don't want to do this, but enabling on desktop broke a ton of sites. For reference -

Bug 726615 - Support W3C touch event instead of MozTouch event
Bug 798821 - Disable touch events on Windows
WONTFIX again?
(In reply to Paul [sabret00the] from comment #30)
> WONTFIX again?

Yes. There's been a separate bug filed in FF Metro for using touch in the user agent which has the on-going discussion for the metro concerns. As for this bug, I think we kill it off, as this was referring to replacing a tablet portion of the UA with touch.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → WONTFIX
I think that's a bit premature.

A particularly bad solution would be to say "Touch" on Windows 8 and "Tablet" everywhere else. If there's still an argument for using Touch as it better indicates what this particular UA token is trying to say, then this bug still has validity. If there's no argument for saying "Touch", then what's the other bug about that you mention?

(Which other bug, BTW? Bug 809396?)

Gerv
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
bug 787786 on the metrofx ua.
Gerv, you yourself shut this the first time. Discussion on this had dried up through lack of support. WONTFIX is really the right way to go for this, any other discussion would be more fitting to taking place upon the mailing list/google groups.
(In reply to Gervase Markham [:gerv] from comment #32)
> I think that's a bit premature.
> 
> A particularly bad solution would be to say "Touch" on Windows 8 and
> "Tablet" everywhere else. If there's still an argument for using Touch as it
> better indicates what this particular UA token is trying to say, then this
> bug still has validity. If there's no argument for saying "Touch", then
> what's the other bug about that you mention?

There needs to be argument though - right now I don't see an argument present here for considering replacing tablet with touch. I see an argument for consideration now on considering appending touch on to the UA, which is being discussed in bug 809396.

> 
> (Which other bug, BTW? Bug 809396?)

Yeah, that's the bug I'm talking about.

> 
> Gerv

(In reply to Jim Mathies [:jimm] from comment #33)
> bug 787786 on the metrofx ua.

That's the general bug that was first filed for the UA, but the followup bug later filed about appending touch to the UA is bug 809396.

(In reply to Paul [sabret00the] from comment #34)
> Gerv, you yourself shut this the first time. Discussion on this had dried up
> through lack of support. WONTFIX is really the right way to go for this, any
> other discussion would be more fitting to taking place upon the mailing
> list/google groups.

I'm inclined to agree on still killing of this bug and reopening if the discussion for considering replacing tablet with touch becomes present for consideration again. The appending to the UA piece for touch is being tracked in bug 809396.

I'm suggesting we close this and reopen if this goes into consideration again (as is, people actually move forward with it).
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → WONTFIX
I've just reope(In reply to Paul [sabret00the] from comment #34)
> Gerv, you yourself shut this the first time. Discussion on this had dried up
> through lack of support. WONTFIX is really the right way to go for this, any
> other discussion would be more fitting to taking place upon the mailing
> list/google groups.

Which is precisely what I've done - see mozilla.dev.platform. I'd say the right process is to leave this bug open meantime, but I'm not going to get into an edit war.

Gerv
This bug stays open until a final decision has been made. Thanks.
Status: RESOLVED → REOPENED
Depends on: 809396
Resolution: WONTFIX → ---
So in conclusion: Asa reopened this bug and then kinda abandoned it at the point of actual discussion. Said discussion logically wrapped up with arguments against being at the very least greater in number than those for. It would now seem that despite the suggestion to append "Touch" to devices that warranted being panned, that is in fact the direction where things are headed as seen in bug 809396. But we're still going to keep this bug open just in case.
Looks like pointer media queries should help us there, see http://davidwalsh.name/pointer-media-query - do we have a bug filed on our side to implement that?
Gecko has the non-standard -moz-touch-enabled media feature.
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries#-moz-touch-enabled
Keywords: site-compat
Status: REOPENED → RESOLVED
Closed: 12 years ago8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.