9 ms·
UA Gotta Be Kidding
- Semaphor 5y agoFor 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 Instabridge which seems to be some ad-tech wifi password sharing app and seems close (7.75 % - 10.58 % to overtaking Samsung Internet as 3rd biggest browser. It appears as if almost all their users came from Safari. [0]: https://wolvic.com/ https://wolvic.com/ [1]: https://gs.statcounter.com/browser-market-share/mobile/germany https://gs.statcounter.com/browser-market-share/mobile/germa...
- banaetrhoow 5y agoYou might be interested in this IMC 2017 paper: https://conferences.sigcomm.org/imc/2017/papers/imc17-final253.pdf 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.
- Semaphor 5y agoHah, the android anomaly was fun, despite probably being benign :D The Microsoft UA thing wasn’t actually news to me, they’ve always had crazy hacks like that.
- dmos62 5y agoHm, 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.
- krzyk 5y agoSame for me, but I started with article.
- xnorswap 5y agoUpon 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 won't be the last, but it's very dismissive of the eclectic nature of HN articles to charge into the comments to discuss something else entirely.
- dmos62 5y agoI did find it confusing and I often read the comments first, because I usually find them more interesting. The first line of the article did inform me otherwise: your insight is accurate. I didn't mean to degrade your forum experience. Edit: by the way, if you want don't want to be dismissive of whatever good there is in HN's community, you'd do well not to presume that others are dishonest ("artisticly licensed"). I spent the morning reading about what's actually happening in Ukraine and saw a post on UA's history (this post) and came in expecting to read more about Ukraine. I experienced amusing confusion and shared that.
- samhw 5y agoHonestly, there's no point interacting with these people. Your comment was a perfectly fine chatty observation about the name of the article. 99.9% of people here aren't robots annoyed at any hint of spontaneity - most of us appreciate the odd unexpected turn that injects something different into the discussion. The ways we miss our lives are life :)
- ascar 5y agoI think you should read the HN guidelines before informing other people about how to post. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html Here are a few relevant excerpts: - Be kind. Don't be snarky. Have curious conversation; don't cross-examine. Please don't fulminate. Please don't sneer, including at the rest of the community - Assume good faith. - Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that."
- matsemann 5y agoReminds me of this classic: https://webaim.org/blog/user-agent-string-history/ https://webaim.org/blog/user-agent-string-history/
- paranoidrobot 5y agoIt's been a long time since I saw that. Happy memories, thanks.
- aib 5y agoIs there something like a "capabilities declaration" in the works to actually solve the problem? You know, something like a "X-I-Support: images, frames, ecma6, vr, xss" header? I could even imagine an "assigned capability strings" database and x- prefixes and all, but it's probably an old fool's dream in these fast-m— thing-breaking times.
- makeitdouble 5y agoJavascript can expose capabilities, but it doesn’t help if you want to do server side processing, before sending any response to the client. At this point I think UA spoofing is effectively a compact capabilty declaration, where you say “I can do everything X does + Y and Z specifically”
- account42 5y agoI don't think we should be adding even more overhead to HTTP requests.
- phkahler 5y agoIMHO capability strings is also a bad idea. At best (and I'm still not a fan) they could spec HTTP 2.0 or HTTP 4.0. If there are odd features they're not compliant with then either get with the program and fix their browser, or don't claim that level of support. Most of the problem here is failure to adhere to standards.
- undecisive 5y agoI 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 accordingly. Of course, if you depend on generating a lot of capability specific content on the server side, this may be an issue - but in that _extremely_ rare case that's easily worked around by asking the js to redirect to a URL with specific capabilities baked in (or loading a specific javascript file)
- masklinn 5y agoSadly there are situations where "feature detection" is not really an option e.g. when safari does something really weird and you need a special codepath for it server-side (like the video player not working if the server doesn't support content-range, so you have to not send a video to safari in that case).
- mschuster91 5y ago> like the video player not working if the server doesn't support content-range Yeah, I got bitten by that one too. Pretty darn annoying especially because Safari doesn't tell you what is wrong.
- Szpadel 5y agowouldn't it be easier to add support for content-range instead of adding quirk to exclude videos for safari?
- avereveard 5y agoif browsers would stop lying about dpi, we wouldn't need to guess trough UA wheter something is a low res desktop, a high resolution small monitor or something in between (and let's not start talking about browser windows that aren't fullscreen). once we could at least use the availability of touch features to guide between the cases, but now that one started lying as well. we parse user agent not because we like to but because the absolute shitshow that's the metrics system on browsers.
- amelius 5y agoArticle doesn't mention fingerprinting, a force that goes against the growth of the number of unique UA strings.
- Nition 5y agoWhat is the origin of the "U" on its own that appears in so many user agent strings? For example: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.5) Gecko/20041108 Firefox/1.0"
- 867-5309 5y agouniversal, suitable for all audiences
- gsnedders 5y ago[U]SA, specifically relating to encryption back when the US considered encryption munitions, and hence there were separate US and international ("I") releases supporting different crypto suites of browsers developed by US-based companies.
- mike_hearn 5y agoThe 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 Safari users (much slower downloads), or give up and ask the user which to pick. Chrome has an API that lets you determine the CPU arch using JavaScript. Really there's nothing wrong with having a UA header but it gets abused because HTTP never had any standardized way to communicate feature sets. It should have had both. A way to identify specific apps for bug workarounds etc, and a way to communicate what versions and parts of the specs are implemented.
- jeroenhd 5y agoI'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 client side detection and exact UA strings to match (for now). Matching ranges of user agent versions simply doesn't work right (see the Chrome/Firefox 100 issue for an example why) and often leads to broken workaround code being sent to browsers years after a fix was made.
- throw0101a 5y ago> 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).
- jeroenhd 5y agoI've noticed something similar on some websites where "Linux" is assumed to mean "Android" because most user agent strings identifying as Linux are secretly Android devices. It's really frustrating, especially with websites that think responsive design means your site switches to phone/tablet mode the moment its magic detection methods think they found a handheld.
- HAL9000Ti 5y agoUA 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://www.chromium.org/updates/ua-reduction/ https://wicg.github.io/ua-client-hints/ https://wicg.github.io/ua-client-hints/
- mminer237 5y agoAbout 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.
- kbelder 5y agoYou 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...
- jedimastert 5y agothe brand and major version hints are sent with every request regardless of preferences, so no "back channel" needed.
- grishka 5y agoThe 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.
- seydor 5y agoJust think of the terrabytes of wasted bandwidth, there s like 60 spaces in those strings
- capableweb 5y agoWell, you'd have to separate the different values in the User-Agent somehow, what character would you suggest? They all take the same amount of space (no pun intended). If you're worried about spaces in user-agents wasting bandwidth, there are a awful lot of windmills you'd have to bark at every day, I do not envy you.
- bullen 5y agoThe 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.
- RickyPointin 5y ago
- werdnapk 5y agoWhat's so special about Safari/537.36? The number doesn't appear to have any real meaning as it doesn't change.
- jffry 5y agoFrom this list of Chrome versions [1], it looks like WebKit 537.36 was the last version used before Google forked it to Blink, so I imagine they keep that around in the UA for backwards compatibility with sites that were looking for it. You can even see it will stick around in the plans [2] they have to reduce the information contained in Chrome's UA [1] https://en.wikipedia.org/wiki/Google_Chrome_version_history https://en.wikipedia.org/wiki/Google_Chrome_version_history (scroll down to v27.0.1453 on 2013-05-21) [2] https://www.chromium.org/updates/ua-reduction/ https://www.chromium.org/updates/ua-reduction/
- sysadm1n 5y ago> Of course, a side effect of all of this is that ultimately all of those simple variants in the UA and work that goes into those giant databases mean that we could know an awful lot about you, by default. So that's not great. I encourage anyone who's using Firefox to turn the `privacy.Resistfingerprinting` setting to `true`. It gives you a generic Windows 10 useragent with an old version of Firefox. The Tor Browser Bundle does this so you can blend in with the same UA.
- zagrebian 5y ago> privacy.Resistfingerprinting Does it have any negative side-effects?
- dicethrowaway1 5y agoSince the generic fingerprint is associated with Tor, you get a lot more captchas. And JS that shows event times based on your clock (say a schedule) will think your time zone is UTC.
- sysadm1n 5y agoYeah it breaks some sites and extensions. There's more info on browser fingerprinting here: https://restoreprivacy.com/browser-fingerprinting/ https://restoreprivacy.com/browser-fingerprinting/ It doesn't just spoof the UA, it does some other things too. Not sure what they are. It's part of the Tor Uplift[0] initiative. [0] https://wiki.mozilla.org/Security/Tor_Uplift https://wiki.mozilla.org/Security/Tor_Uplift
- sysadm1n 5y agoAlways enjoyed putting a custom UA for my browser. Say Chrome version 201 to make people think I'm a time traveler visiting their site
- Aissen 5y agoI feel like the 90% use case could be fixed with a clean js feature detection API from browsers. Basically caniuse.com, but programmatically accessible. Any new feature must have a name, and sub-names for granularity. Any difference of implementation between major UAs must be given names. It does not need to be in headers, anyone wanting that could take the latency hit of a pre-detection js page. My 2cts.
- Rychard 5y agoThere is some portion of the population that has an aversion to providing additional metadata about their browser, as it will be incorporated into your "browser fingerprint", increasing the likelihood that your browser can be (effectively) uniquely identified[0]. If there were some way to assure that this data wouldn't be used against me in some way, I would happily embrace simple solutions such as this. Unfortunately, there is no shortage of hackers/companies/governments that will gobble this data up and attempt to extract as much money from it as possible, without even the slightest consideration as to the impact it will have on end-users. [0]: https://www.amiunique.org/ https://www.amiunique.org/
- colejohnson66 5y agoThe alternative to providing APIs to detect features is to keep using the mess we're currently using. Previously, I would see you're using Chrome version X and know what features are available. All the APIs do is shift from using hacked together string.contains(...)/string.indexOf(...) calls (with bad lookup tables) to a proper format where I can just ask isXAvailable(). Basically, the same information is there, just in a more accessible way. And if you disable a feature in your browser's settings, isXAvailable() will now return false while UA checking says you still have it.
- Aissen 5y agoI understand the fingerprinting angle. It could be mitigated by ensuring a given UA will have all versions across OSes be the same set of feature, and only evolve these feature bits at the same time as version. Developer mode could have more granularity, at the cost of uniqueness.