Live data from Hacker News

Chrome phasing out support for User-Agent

infoq.com

131–140 of 329 posts

Re: Chrome phasing out support for User-Agent

#131
post #36

The weird thing about this is that the only company I've seen doing problematic user-agent handling in recent years is Google themselves. They have released several products as Chrome-only, which then turned out to work fine in every other browser if they just pretended to be Chrome through the user agent. Same with their search pages, which on mobile were very bad in every non-Chrome browser purely based on user age…

> The weird thing about this is that the only company I've seen doing problematic user-agent handling in recent years is Google themselves.

I frequently consume web articles with a combination of newsboat + Lynx, and it's astounding how many websites throw up HTTP 403 messages when I try to open a link. They're obviously sniffing my user agent because if I blank out the string (more accurately, just the 'libwww-FM' part, then the site will show me the correct page.

I'm pretty sure that the webmasters responsible for this are using user agent string blocking as a naive attempt to block bots from scraping their site, but that assumes that the bots that they want to block actually send an accurate user agent string the first place.

Re: Chrome phasing out support for User-Agent

#132

does this mean there will no longer be a way of determining if the device is primarily touch (basically all of "android", "iphone" and "ipad") or guesstimating screen size ("mobile" is typical for phones in the UA) on the server? https://developer.chrome.com/multidevice/user-agent i wonder what Amazon will do. they serve completely different sites from the same domain after UA-sniffing for mobile. is the web just goi…

browser feature detection is the way grown up developers have been doing this for several years now. user agent sniffing is dumb because it bundles a ton of assumptions with a high upkeep requirement, all wrapped up in an unreadable regex. It's been bad practice for ages; I'd be surprised if that's how Amazon is doing it still.

> browser feature detection is the way grown up developers have been doing this for several years now.

and how do these grown up developers feature-detect when js is disabled? or are they too "grown up" to deal with anything but the ideal scenario?

> I'd be surprised if that's how Amazon is doing it still.

why don't you go there and open up your "grown up developer" devtools.

Re: Chrome phasing out support for User-Agent

#133
Can't happen soon enough. As a frequent user of various non-mainstream browsers i'm sick and tired of seeing "your browser isn't supported" messages with download links to chrome/etc. At least in the case of Falkon it has a built in user agent manager, and I can't remember the last time flipping the UA to firefox/whatever actually caused any problems. Although, i've also gotten annoyed at the sanctimoniousness web sites that tell me my browser is to old because the FF version I've got the UA set to isn't the latest.

Re: Chrome phasing out support for User-Agent

#134
post #105
post #58

Earlier quoted context omitted.

> I don't really understand how this will result in any real difference in privacy or homogeneity of the web. It does a little: sites don't passively receive this information all the time, instead they have to actively ask for it. And browsers can say no, much like they can with blocking third party cookies. In any case I'm not sure privacy is the ultimate goal here: it's intended to replace the awful user agent snif…

> It does a little: sites don't passively receive this information all the time, instead they have to actively ask for it. And browsers can say no, much like they can with blocking third party cookies. Lets run through that scenario: sites that don't need this info still aren't gonna ask for it or use it. sites that want it will get it this way and even if you respond with "no" that's useful to them as well for finge…

> sites that want it will get it this way and even if you respond with "no" that's useful to them as well for fingerprinting

To an extent, sure. But to follow the model of third party cookies, let's say client hints are used extensively instead of user agent and all cross-domain iframes are blocked from client hint sniffing. All the third party iframe is going to be able to detect is whether user has a client hint capable browser or not. That's a big difference from the whole user agent they get today.

The idea is that this won't be a Chrome-specific API. It's been submitted to standards bodies, but Chrome is the first to implement. For example, Firefox have said they "look forward to learning from other vendors who implement the "GREASE-like UA Strings" proposal and its effects on site compatibility"[1] so they're not dismissing the idea, they're just saying "you first".

https://mozilla.github.io/standards-positions/#ua-client-hin...

Re: Chrome phasing out support for User-Agent

#135

Earlier quoted context omitted.

Every single Google product is slower on Firefox and it’s hard to not call this malice and artificial. Many people check out Gmail and GMaps on Firefox and go back to Chrome because of their clunkiness on Firefox.

> malice and artificial are you actually asserting that Google is purposefully adding code/"tweaking" their web apps to run slowly on browsers other than Chrome? do you have any evidence at all for this other than anecdotes about people experiencing Google web app clunkiness on Firefox?

If there was direct evidence it would warrant its own post, so I think your comment has been made in bad faith since people are talking about their own experiences.

That said; if it's possible to measure firefox/chrome performance (with altered user-agents) it would make for a good blog post.

Re: Chrome phasing out support for User-Agent

#136
post #36

The weird thing about this is that the only company I've seen doing problematic user-agent handling in recent years is Google themselves. They have released several products as Chrome-only, which then turned out to work fine in every other browser if they just pretended to be Chrome through the user agent. Same with their search pages, which on mobile were very bad in every non-Chrome browser purely based on user age…

A fair number of websites will still block perfectly working features based on what OS you use.

Some examples I've seen using the latest Firefox on *BSD:

Facebook won't let you publish or edit a Note (not a normal post, the builtin Notes app). I think earlier they wouldn't play videos but they might have fixed that.

Chase Bank won't let you log in. Gives you a mobile-looking UI which tells you to upgrade to the latest Chrome or Firefox.

In these cases if you lie and say you're using Linux or Windows it works flawlessly.

Re: Chrome phasing out support for User-Agent

#137

Earlier quoted context omitted.

I agree, but this also is incredibly dependent on the major players (e.g. Google) not going off on their own making changes without agreement from other browsers... There are still issues today where chrome, edge, and Firefox render slightly differently. I certainly agree user agent isn't terribly necessary, but it's literally the only hook to identify when css or JavaScript needs to change... Or to support people on…

Maybe web publishers need to let go of this idea of pixel-perfect rendering and identical JavaScript behavior across browsers, and instead just worry about publishing good content. The web is not Adobe InDesign or Photoshop. At its essence it is a system for publishing text and hyperlinks that point to other content. Get the content right and don't worry so much about whether the scrollbar is 2 pixels thick or 3.

I, too, remember how this opinion was repeated as nauseam about a decade ago. It didn’t make much sense then, and even less now.

Nobody today expects identical rendering: people are used to responsive websites, native widgets etc. The problem people are actually experiencing (far less now than in the past) were more serious, such as z-axis ordering differences resulting in backgrounds obscuring content.

For JavaScript, I struggle with how non-“identical behavior” would express itself, except as a blank page and a small red icon in devtools.

Re: Chrome phasing out support for User-Agent

#138
Good. User-agent strings are a mess. Here is an example of a user-agent string. Can you tell what browser this is?

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13

How did they get so confusing? See: History of the browser user-agent string https://webaim.org/blog/user-agent-string-history/

Also, last year, Vivaldi switched to using a user-agent string identical to Chrome’s because websites refused to work for Vivaldi, but worked fine with a spoofed user-agent string. https://vivaldi.com/blog/user-agent-changes/

Re: Chrome phasing out support for User-Agent

#139

Earlier quoted context omitted.

Every single Google product is slower on Firefox and it’s hard to not call this malice and artificial. Many people check out Gmail and GMaps on Firefox and go back to Chrome because of their clunkiness on Firefox.

> malice and artificial are you actually asserting that Google is purposefully adding code/"tweaking" their web apps to run slowly on browsers other than Chrome? do you have any evidence at all for this other than anecdotes about people experiencing Google web app clunkiness on Firefox?

It could also be a passive, malicious de-prioritization of bugfixes for Firefox that would cause the same effect. It seems like this would be a more likely scenario.

Re: Chrome phasing out support for User-Agent

#140

Earlier quoted context omitted.

If you have the new Chromium-based Edge ("Edgium") installed: the compatibility list at edge://compat/useragent is really interesting. Edgium pretends to be Chrome towards Gmail, Google Play, YouTube, and lots of non-Google services; on the other hand, it pretends to be Classic Edge towards many streaming services (HBO Now, DAZN, etc.) because it supports PlayReady DRM, which Chrome doesn't. [Edit] Here is the full l…

This is off topic but do you know why Edge is the only browser to support DRM for streaming? Or is that incorrect? I see lots of people who have to use edge on order to get 4k content from Netflix; presumably because of the DRM issues.

Simply because Netflix uses Playready DRM for 4k streaming, which is even harder to bypass and requires WinRT API (?) to even able to use the recent version.

Currently only Microsoft itself even try to implement it on their own Chromium-based browser.

Post reply on HN