9 ms·
Version 100 in Chrome and Firefox
- silvestrov 5y agoPlease, not another hack of the user-agent string. If sites break, let them break.
- peakaboo 5y agoCompletely agree.
- daveslash 5y agoYes. Agreed. Sites should be doing their best to avoid having to check the UA String. For some tightly-controlled environments (medical, aerospace, etc...) where all software components & tooling has to be qualified for use, I can see checking the UA in order to throw up a "your browser is not supported" banner ("not supported usually means "we haven't tested it, so we can't assert this web app will work properly", not so much "our app won't work"). But sites should really avoid responding with different content/html, etc.... for different browsers (though, I have encountered sites that serve images as webp to chrome and jpg to IE...)
- dgb23 5y agoThe picture element let’s you do that very conveniently w/o checking the UA. It’s a bit like a switch statement.
- silvestrov 5y ago> tightly-controlled environments (medical, aerospace, ...) This are places where you don't automatically upgrade browsers but keep them at one specific version. No rocket/airplane wants to stop working because something changed. It is also places which are good at writing contracts that can ensure such things to work, so these places should not be a concern. It's likely cheap shoddy sites that will be a problem. The ones that think jQuery is too advanced tech.
- lcnmrn 5y agoJump from 99 to 109 then let them break. Internal sites of universities and corporations need to work until they get fixed.
- Hamuko 5y agoIf those internal sites are so crucial, then maybe they shouldn't build them like a house of cards.
- sangnoir 5y ago> If those internal sites are so crucial, then maybe they shouldn't build them like a house of cards They were built by a PhD candidate in 2012 and the source has been lost to the mists of time. It's still critical to the research group's workflow though, so they switch to Edge instead of rewriting it . A month later they encounter an article on HN asking "Why is Firefox losing marketshare and how would you save it?"
- GoblinSlayer 5y agoOne check code was 1 * this.versionData.substring(0, 2) < 23, so it would need to jump to something like version 9900 or 99000.
- tpmx 5y agoIf sites break, let them break. That's incredibly arrogant, IMO. Imagine the amount of pointless work that would cause world-wide, and the cumulative amount of pain experienced by readers of the web for years. It's pure value destruction on a global scale, just making things worse to prove a point. A better solution is to realize that the UA header has been completely broken for decades and do yet another compat hack, whilst transitioning to some more futureproof mechanism. The web needs a Linus occasionally screaming: don't break things for shits and giggles.
- coldpie 5y agoYes. Your software doesn't exist in isolation; you have users. Your #1 goal is not to make your software ideologically perfect. Your #1 goal is to make your software useful to its users. Sometimes you have to break things, yes, but these events should be strongly justified and impossible in practice to avoid. Bumping a version number in a user-agent string doesn't rise to that level.
- Beltalowda 5y agoSome people relying on fixed width digits will happen anyway, no matter how you send the version. There's decades of experience with this. It has nothing to do with the User-Agent header as such. With the Chrome "backup plan" literally everyone will have to modify their code to make it work, making it more convoluted in the process. With the "well, just break stuff then" only the small number of people who relied on a fixed width of the version will have stuff break. This seems like a decent enough trade-off, and will almost certainly save programmer time globally.
- coldpie 5y ago> With the Chrome "backup plan" literally everyone will have to modify their code to make it work I don't understand. If you need to detect a >99 version, then yes, you'll need to update your code, but you'll need to do that anyway, to add your >99 logic in the first place. If you don't need to detect that, then no changes are needed, and as a bonus no poorly-coded sites will break.
- yifanl 5y agoWhy is there version numbers for web browsers at all when version bumps are forced? To the average user, it's not a meaningful number at all. Breaking sites as a side effect for bumping a version number that can't not be bumped is a totally insane thing to me.
- allendoerfer 5y agoWhat a great time to stop reporting them altogether to minimize fingerprinting for all future versions.
- samwillis 5y agoIn all seriousness can we please replace the user agent, and add a new header that is meant to supersede it. We can then freeze the current user agent at v99 with all the other rubbish that's still in it and put real correct date in a standard format in a new header. I know there are arguments that a new version will be abused just as much, but I think we should be able to find ways to elevate that by, for example, limiting the length of different fields so doubling up of information to mask the truth or detect as two different browsers isn't possible. We could even design this new system specifically to be fingerprint proof, just report the essentials which is pretty much just the browser engine (webkit/blink/gecko) and version. don't even need the actual browser and os.
- hoten 5y agoIt's called Sec-CH-UA.
- samwillis 5y agoThis seems very overly engineered, I was thinking something far simpler and much more limited with no negotiation. I can see the use case for this. Maybe in parallel with a simpler header. https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hints https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hin...
- capableweb 5y agoEveryone knows it's so easy to migrate a HTTP header that has been in use since basically forever (in internet time). It'll never be possible to completely change it to something else, just imagine all the software that assumes that header to be there. And for in-browser stuff (via JS), you already have an alternative that works perfectly fine, `window.navigator`, that looks something like this: { "permissions": {}, "mimeTypes": {}, "plugins": {}, "doNotTrack": "unspecified", "maxTouchPoints": 0, "mediaCapabilities": {}, "oscpu": "Linux x86_64", "vendor": "", "vendorSub": "", "productSub": "20100101", "cookieEnabled": true, "buildID": "20181001000000", "mediaDevices": {}, "serviceWorker": {}, "credentials": {}, "clipboard": {}, "mediaSession": {}, "webdriver": false, "hardwareConcurrency": 8, "geolocation": {}, "appCodeName": "Mozilla", "appName": "Netscape", "appVersion": "5.0 (X11)", "platform": "Linux x86_64", "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0", "product": "Gecko", "language": "en-US", "languages": [ "en-US", "en" ], "locks": {}, "onLine": true, "storage": {} } Or is there something else you're missing from window.navigator?
- WalterGR 5y agoThis reminds me of Microsoft skipping Windows 9 and going from Windows 8 to Windows 10.
- larrik 5y agoAt least that was linear. Their Xbox went to 360 second, then "One" third then "Series". Like that makes any sense at all.
- wnoise 5y agoI'm really disappointed that after 360 wasn't delta. Then the series would spell out X □ ○ ∆ .
- SAI_Peregrinus 5y agoUSB went from 1.0, to 1.1, to 2.0, to 3.0. 3.0 got renamed 3.1 Gen 1, and 3.1 Gen 2 got introduced. Then 3.2 came around, which renamed 3.1 Gen 2 into 3.2 Gen 2x1, and introduced 3.2 Gen 1x2 and 3.2 Gen 2x2. USB 4.0 introduces USB 4.0 Gen 2x2 and USB 4.0 Gen 3x2. This is ignoring the battery charging, alternate modes, etc. Just the main USB versions.
- BitwiseFool 5y agoA pet peeve of mine is when corporations try to use "One" as a brand. Not only is it horribly uncreative, it's been done countless times by countless companies and it never sticks. They're trying to get across the idea that this one product does everything, or that different products/offerings are now unified. But "One" is lazy and unoffensive in the corporate world. Steve Ballmer wanted a "One Microsoft", SkyDrive being renamed to OneDrive was partly due to this, and was hoping people would call the XBox One "The One".
- skykooler 5y agoOr, similarly, X. A few years ago, I had a OnePlus X and a Sony Xperia X. The iPhone X had just released, as had the Xbox One X, etc.
- fantyoon 5y agoHuh, this is the first time I have heard about interventions. Checking about:compat on Firefox for Android reveals (perhaps unsurprisingly) multiple fixes for Google sites. I wonder what constitutes deploying an intervention versus letting the site break. I understand that part of the reason Google sites are being fixed by Mozilla is because they are popular.
- ethbr0 5y agoWhat kind of crap user-agent parsing library are people using that breaks from 2 to 3 digits? If that was a bug, I'd be pretty suspicious about the general software quality in the rest of the library.
- pictur 5y agovery optimistic point of view.
- samwillis 5y agoThis is the same field that thought they could save a year as two digits and didn't think their software would still be in use 30 years later. It's not crap, it's just short sighted.
- larrik 5y agoTo be fair, in 1970 those 2 digits were very expensive. It was a calculated tradeoff at worst.
- cesarb 5y ago> To be fair, in 1970 those 2 digits were very expensive. More than just "very expensive". Often, you were limited to exactly 80 columns for each record. If you had for instance three dates on one record, using 2 digits instead of 4 digits saved 6 columns, which is over 7% of the available space.
- ethbr0 5y agoTrue, but user-agent was 1996(?). By then, we weren't talking about limited mainframe storage devices. It just baffles that someone can look at a monotonically increasing number, defined and incremented by a third party, and say "That will never be 3 digits."
- Beltalowda 5y agoI'd wager it's mostly fixed string indexes, regular expressions ("\d{2}"), and things like that. Maybe also some people with a "varchar(2)" column in the database. A lot of software is written by junior programmers, not infrequently in a hurry. It's an easy mistake to make and if you've been bitten by it once you'll remember it, but many people have never been bitten by it.
- gary_0 5y agoLast I heard, Chrome was phasing out user-agent strings anyways[0]. There's already a feature flag, and turning it on makes the user-agent "generic" so that specific browser and OS versions are rounded off and end with 0's. In other words, relying on browser version numbers is deprecated by Google fiat. [0] https://news.ycombinator.com/item?id=22685018 https://news.ycombinator.com/item?id=22685018
- vdnkh 5y agoA lot of people here are calling for the death of UAs, but this would be bad for video because capabilities are inconsistent across the web, and because APIs are incomplete or lie. For example, the "canPlayType" API for whether a codec is supported returns "probably" or "maybe". So we sometimes need to hardcode which browsers support which new codecs. Also, there are several bugs in past and present versions of decoder implementations, which are only discovered though manual testing, or by observing quality of service metrics split by browser version (Firefox does not handle bad audio packets as well as Chrome, for example). In IE and old Edge, the video readyState would always be "4" after playback beings, even during buffering, which is a blatant violation of the spec Microsoft refused to fix (as stated in their bugtracker). Browsers like Safari have subtly different event orders from the HTMLVideoElement which requires a burdensome workaround that us working in video just like to keep to Safari instead of poisoning other implementations. A final fun quirk is that not all browsers gave accurate HTTP timing information until recently (notably, Safari < 14) which make download timing for the purpose of determining bandwidth very inaccurate. This is why Twitch only recently supported low-latency playback for Safari. There is no other way to ask "do you support accurate timing" other than for an engineer to test it and hardcode an exception.
- dangerlibrary 5y agoCounterpoint: As a user, often the only way to get a video to play in any browser on linux is to modify the user agent. And then, when you do spoof the user agent, it works just fine.
- Osiris 5y agoThis was so common in Opera 12 that there was a dedicated button in the UI to change the user agent for a page. The browser also included a built-in user agent compatibility list and the user could manually add sites to use a specific UA string. Most sites would work fine in Opera with the correct UA. Many did not work when using the default UA with the word "Opera" in it.
- cpeterso 5y ago
- adamrezich 5y agoI haven't parsed a user agent in about 15 years—what is the actual use case for doing so these days? it seems like it's only become less and less valuable of a thing to do over time.
- asddubs 5y agohere's my two use-cases: working around browser bugs, figuring out if it's a mobile device (e.g. to hide drag-and-drop features for file uploads) prominent example for a browser bug: https://catchjs.com/Blog/SameSiteCookies https://catchjs.com/Blog/SameSiteCookies
- can16358p 5y agoMe neither. But some do, especially if they 100% need features working that are half-supported/different for different browsers. Though, I don't find many examples of it and checking individual features for determining whether an API is available for example (doesn't apply to everything, yes I know) right, non-hacky way to go.
- yread 5y agoI have to reduce size/resolution of my canvas for iPad as mobile safari gets really slow with html canvases around 10k x 10k size. It's tricky because mobile safari has exactly the same UA as normal safari.
- artursapek 5y agoImagine writing a user-agent parser and not foreseeing a future where they might have three digit numbers lmao
- mutatio 5y agoRegarding the dropping of the user agent string, are folk not concerned that it would lead to future web development coalescing towards a Chrome "world view"?
- brutal_chaos_ 5y agoDevelopment seems to be moving in that direction already (see market share per browser and the number of "Chrome only" sites). How would removing UAs continue or hinder that trend?
- mutatio 5y agoI just wonder if it would lead to further cementing the Chrome-first approach to web dev - in the context of browser sniffing in JS libs and even backend code. I guess this doesn't drop support for JavaScript navigator properties so maybe JS is fine.
- arubania2 5y ago> What are browsers doing about it? I really hate this narrative. Why should the browsers give a damn? There should be nothing required of the browsers, the only ones to worry are the idiots writing faulty UA parsers and baking in their assumptions.
- freemint 5y agoBe liberal in what you accept be conservative in what you produce.
- t8e56vd4ih 5y agoI just checked - both Firefox and Chrome are at version 97. that's sort of funny.
- j1elo 5y agoThe topic about quality of software has been brought up several times in HN, and here we are. I'm ashamed that in our industry, we are still tripping over pebbles and writing code so utterly shitty that it breaks when a number goes from 2 to 3 digits, of all complex things that happen in our world. The bar was so extremely low, that I'd be OK letting parsers break due to their short sightedness. Not even in embedded space (where I've got some experience to know that computing resources are scarce) this would pass as understandable.
- mrtweetyhack 5y ago
- pc2g4d 5y agoPff, just let sites break, that's what webdevs are for :-P We all survived the shift from 1 digit to 2 digit, so this seems like way too much trouble.
- jka 5y agoBoth Chrome and Firefox have been engaging in community-based testing to try to find sites that break due to this version increment. The webcompat project has a list of some compatibility issues reported so far: https://webcompat.com/issues?page=1&per_page=100&state=open&stage=all&sort=created&direction=desc&q=label:version100 https://webcompat.com/issues?page=1&per_page=100&state=open&...