Live data from Hacker News

UA Gotta Be Kidding

bkardell.com

71–80 of 93 posts

Re: UA Gotta Be Kidding

#71

The 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…

> HTTP never had any standardized way to communicate feature sets Except for the "Accept", "Accept-Language", "Accept-Encoding" and "Accept-Charset" headers (the last is phased out because UTF-8 is now used universally). I don't think extending it much further than that is reasonable without introducing some binary encoding for a giant bitmap, and even that would eat more bandwidth than it's worth.

It doesn't have to be giant. If HTML5 were actually versioned then you could just roll extensions into the base standard every few years. In practice people do that anyway in an ad-hoc manner. After a while enough browsers have implemented something for long enough that people stop feature testing.

Re: UA Gotta Be Kidding

#72

The 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…

> 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

#73

The 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…

Your Web page should not need to know the CPU architecture and should not be allowed to know the CPU architecture. Any "feature" that supports that in any way is a bad idea. Software distribution is a trivial corner case that does not justify either the complexity or the security risk of giving that out.

Software distribution is a rather critical task in general purpose computing!

Re: UA Gotta Be Kidding

#74

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/

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.

Re: UA Gotta Be Kidding

#75

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/

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

#76
post #67

Earlier quoted context omitted.

Why not show/hide those buttons with a window width css media query?

how would that help? The window width of my iPad is larger than my desktop

What can the website do on your desktop that it can't do your iPad? Why does it need these buttons?

Re: UA Gotta Be Kidding

#77

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 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.

Re: UA Gotta Be Kidding

#78

The 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…

Your Web page should not need to know the CPU architecture and should not be allowed to know the CPU architecture. Any "feature" that supports that in any way is a bad idea. Software distribution is a trivial corner case that does not justify either the complexity or the security risk of giving that out.

Our "trivial corner case" is somewhere north of 1M downloads per month. We offer packages for several OS+architecture combinations, and being able to highlight the appropriate download link adds a non-trivial bit of convenience for our users.

Re: UA Gotta Be Kidding

#79
post #77

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…

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

#80
post #77

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…

> 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. Designs which treat different device classes differently tend to be rigid, and fail to anticipate subtle differences or factors within those device classes.

I hesitate to link to the snotty site most commonly used to point this out (though I will if anyone asks), but HTML is responsive by default. Knowing this, and building upon it, is a great way to start learning how to build responsive pages that work really well.

Post reply on HN