UA reduction has officially started with Chrome 101: The UA string is not sending the minor version anymore, only 0.0.0. This is the beginning of the end for the UA string. As more and more UA reductions are deployed, the UA hints will become more useful and eventually depreciate the UA string entirely. https://www.chromium.org/updates/ua-reduction/ https://wicg.github.io/ua-client-hints/
The one important use of the UA string is being able to tell whether it's a computer or a mobile device, to use different templates to render your pages. The new "client hints" botched that because while yes, there is "CH-UA-Mobile" that gives you a straight yes/no answer with no guesswork involved, you have to ask for it first — you can't get it on the first request, which very much defeats its purpose. And don't su…
UA Gotta Be Kidding
81–90 of 93 posts
Re: UA Gotta Be Kidding
#82Earlier quoted context omitted.
About time. Statistics are mostly dead in favor of privacy anyway. At least this should help stop Google's blatantly anti-competitive practice of neutering search results if you're not using Chrome.
You think Google is reducing info Chrome sends in its user agent string in order to limit the ability of Google to favor Chrome? I can't imagine Google would be doing this without some sort of back-channel method of tracking this exact info. They're likely just removing this info from visibility to other websites, giving themselves a competitive advantage. Man, that sounds a little paranoid, but...
Re: UA Gotta Be Kidding
#83The whole privacy-through-UA thing maybe gone too far though. Safari on M1 Mac identifies itself as Intel Safari. A web server knowing whether you use an older or newer Mac is not going hurt anyone, but the lack of it does hurt the UX of distributing Mac apps. For download size reasons you really want to give the user a build for the right CPU architecture, but due to this lie you have to either ship a fat app to Saf…
How important is that nowadays? Aren't we talking about just executable code? Just how large is your binary?
Universal binaries are very convenient.
Re: UA Gotta Be Kidding
#84Earlier quoted context omitted.
The one important use of the UA string is being able to tell whether it's a computer or a mobile device, to use different templates to render your pages. The new "client hints" botched that because while yes, there is "CH-UA-Mobile" that gives you a straight yes/no answer with no guesswork involved, you have to ask for it first — you can't get it on the first request, which very much defeats its purpose. And don't su…
> And don't suggest me to use the same markup for both desktop and mobile with adaptive styles. More often than not this ends up being equally terrible on both kinds of devices. My experience is generally (though not always) the exact opposite. It’s usually the case that when designers and implementers took the care to ship a properly responsive design, they’ve produced a design that adapts well to many factors. Desi…
Here's an example from my own project: same post, different layouts. https://imgur.com/a/7uOy7II
Re: UA Gotta Be Kidding
#85Earlier quoted context omitted.
The one important use of the UA string is being able to tell whether it's a computer or a mobile device, to use different templates to render your pages. The new "client hints" botched that because while yes, there is "CH-UA-Mobile" that gives you a straight yes/no answer with no guesswork involved, you have to ask for it first — you can't get it on the first request, which very much defeats its purpose. And don't su…
Not sure what's the issue here, according to the spec you should be able to get it on the first request: > Sites that wish to serve mobile-specific sites using UA-CH can do that using the Sec-CH-UA-Mobile headers that are sent by default on every request. What am I missing?
Re: UA Gotta Be Kidding
#86Earlier quoted context omitted.
> And don't suggest me to use the same markup for both desktop and mobile with adaptive styles. More often than not this ends up being equally terrible on both kinds of devices. My experience is generally (though not always) the exact opposite. It’s usually the case that when designers and implementers took the care to ship a properly responsive design, they’ve produced a design that adapts well to many factors. Desi…
The problem is that you can't really use the same markup for both touchscreens and mice. Touchscreens call for oversized everything so it's easy to hit things with your finger. Mice are much more precise, enabling you to pack everything more tightly, and capable of hovering, enabling you to add new interactions like revealing things on hover. Moreover, phones are mostly vertical and computer screens are mostly horizo…
If you must make the distinction, it’s a media query away:
@media (any-pointer: coarse) {
/* this is a touch screen or other device which would benefit from larger tap targets */
}
@media (any-pointer: fine) {
/* this is a device with a mouse, trackpad, or other similar high precision pointer input */
}
@media (any-pointer: coarse) and @media (any-pointer: fine) {
/* this is both */
}
Not only will that work for the same markup, it’ll also improve support for other devices like tablets and laptops with touch screens.> Moreover, phones are mostly vertical and computer screens are mostly horizontal.
These are wild assumptions which also would better be served by a media query (aspect-ratio, min-aspect-ratio, max-aspect ratio, min-height, min-width). This will also better support other devices like tablets, as well as users like me who browse on desktop with a window much taller than it is wide.
> There's much difference between the two interaction paradigms if you want to provide a fitting UX for both.
Of course. But there’s no need to serve different markup to accommodate them. Besides the aforementioned media queries, you can do quite a lot to accommodate different viewport sizes and quite a lot else with eg grid or flexbox. You just have to know which tools to use for your use case, or how to discover them.
Re: UA Gotta Be Kidding
#87Earlier quoted context omitted.
> you really want to give the user a build for the right CPU architecture, but due to this lie you have to either ship a fat app to Safari users (much slower downloads), or give up and ask the user which to pick. But the computer they download the application on isn't necessarily the computer they'll run it on anyway, so you still need to give the user the option to pick.
That's often true when people are downloading stuff for servers but how many are downloading on an M1 Mac and then moving it to an Intel Mac? It seems like an extreme edge case.
Re: UA Gotta Be Kidding
#88I think it's interesting to note that the majority of web developers for at least the last 10 years have realised that the User Agent is a very flaky way to determine capability. It is almost universally ignored now (with a few enterprise-level exceptions) So the usual solution is feature detection, where the javascript and/or CSS learns the true capabilities of the browser, and switches features on and off according…
Re: UA Gotta Be Kidding
#89UA reduction has officially started with Chrome 101: The UA string is not sending the minor version anymore, only 0.0.0. This is the beginning of the end for the UA string. As more and more UA reductions are deployed, the UA hints will become more useful and eventually depreciate the UA string entirely. https://www.chromium.org/updates/ua-reduction/ https://wicg.github.io/ua-client-hints/
The one important use of the UA string is being able to tell whether it's a computer or a mobile device, to use different templates to render your pages. The new "client hints" botched that because while yes, there is "CH-UA-Mobile" that gives you a straight yes/no answer with no guesswork involved, you have to ask for it first — you can't get it on the first request, which very much defeats its purpose. And don't su…
More often than not, I immediately go and switch out of Mobile site for pretty much everything I visit on mobile.
Features are missing, functionality is broken or gone, they force text/page sizes that don't work for me and block zooming (Firefox thankfully allows me to override that b.s now), and they serve "Install our App!" overlays.
Doordash I found is like this - some stores use them for white-labelled Delivery and SMS/Email you a link to the tracking page for your order.
I click the link on my desktop, I get a standard page, it shows a tracking map.
I click the link on my phone, I get a mobile version of the page which does have a tracking map, but the entire screen is covered with an overlay that says "Install our App!" with no dismiss option and you have to try to make out the driver's location through the 80% opaque overlay.
Re: UA Gotta Be Kidding
#90The whole privacy-through-UA thing maybe gone too far though. Safari on M1 Mac identifies itself as Intel Safari. A web server knowing whether you use an older or newer Mac is not going hurt anyone, but the lack of it does hurt the UX of distributing Mac apps. For download size reasons you really want to give the user a build for the right CPU architecture, but due to this lie you have to either ship a fat app to Saf…
> For download size reasons How important is that nowadays? Aren't we talking about just executable code? Just how large is your binary? Universal binaries are very convenient.