Live data from Hacker News

UA Gotta Be Kidding

bkardell.com

31–40 of 93 posts

Re: UA Gotta Be Kidding

#31
The real problem is that you cannot set the UA with js now in 2022 and that's like 6 years after they decided you should be able to.

Basically you obviously want to remove the UA string as it's just wasting bandwidth.

Re: UA Gotta Be Kidding

#32

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

> It is almost universally ignored now

I wish. Once in a while I come up to sites that present content based on UA (e.g switching UAs produces a different layout). In all cases things work, but the UA pile of lies can make it a subpar experience on this or that device with this or that browser.

Re: UA Gotta Be Kidding

#33

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.

Re: UA Gotta Be Kidding

#36

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.

Re: UA Gotta Be Kidding

#37
post #2

For some reason, I always enjoy reading about UA history. There’s rarely anything new (for me, partially because I lived through some of those earlier changes), but I’m still entertained. This had a new tidbit in the final section, though: They are working on a new XR browser [0] and history is repeating itself. Only tangentially related, but when I checked the mobile browser stats for Germany, I found out about Inst…

You might be interested in this IMC 2017 paper:

https://conferences.sigcomm.org/imc/2017/papers/imc17-final2...

There was a crazy "android anomaly of 2015" that nobody else seems to have noticed.

The Microsoft XML file with domain-UA pairs is among the most insane ideas I have ever seen.

Both are described in this paper.

Re: UA Gotta Be Kidding

#38

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…

I'll bet that the Intel moniker was kept around because websites saw *Safari" combined with "ARM" and started serving iOS-specific cases. The sad truth is that user agent strings are being parsed through the crappiest regexes imaginable. Web browsers are too big to send feature sets to every websites. You'd end up with kilobytes of flags that almost nobody is going to use. If you want to keep a bug database, there's…

> I'll bet that the Intel moniker was kept around because websites saw Safari" combined with "ARM" and started serving iOS-specific cases.*

Sometimes just the keyword "Safari" will get you the mobile site (looking at you arista.com).

Re: UA Gotta Be Kidding

#39

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…

Android chrome sends the manufacturer and build. Might as well send my serial number.

Re: UA Gotta Be Kidding

#40
post #8
post #3

Hm, I thought this was going to be about Ukraine (UA is its ISO code), not a browser's User-Agent string. I started by reading the comments and found them pretty confusing.

Upon opening the article the first line would have informed you otherwise. Instead you felt compelled to instead reply to tell everyone you know that UA is the Ukrainian ISO code. Did you really find the comments "confusing", or is that artistic license? It comes across like, "I couldn't just read the headline and immediately post my reaction to it". You're not the first to have this reaction to HN articles, and you…

HN should have descriptive subtitles though, the title of this piece only makes sense once you know the context, and if browser UA isn't of interest then that's wasting clicks. "An analysis and history of web browser UA strings" seems like a good subtitle to me.

Also, if someone takes a conversation in a direction in a forum that you don't want to follow then best response is usually 'don't follow'.

Post reply on HN